There is a magic trick called Jumping Jack.You can watch it on you tube. But my problem is not about a jack.But about a jumping 7. Anyway your job is to find out a number that ends with 7.But if the 7 jumps to the front it becomes 5 times the previous number. Find the minimum number satisfying this condition.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
My method is different not easy to explain first I wrote -------- 7 in unit place. multiply by 5 = 35 I wrote 5 in 10;s place and c/f 3 and continued the multiplication till I get 714285
Truston Sempf solution 49x + 7 = 7 × 10^n divide by 7
7x + 1 = 10^n so 7x = 10^n – 1
10^n – 1 is of the form ...99999 the property of 7, 11 and 13 six digit number 999999 is divisible by 7, 11 and 13
so 7x = 999999 and x = 142857
you got the answer ?
Did exactly the same (as you said in your first 2 lines) !!
Let x=any positive integer
Let n= the number of digits in x
5 x = ( 1 0 x − 7 ) + 7 ⋅ 1 0 n − 1
The left side of the equation is simple enough. The right side of the equation I have set up will result in the moving of the 7 from the end of the number, to the beginning of the number.
Now we get the all the x on one side of the equation.
5 x = ( 1 0 x − 7 ) + 7 ⋅ 1 0 n − 1 5 x − ( 1 0 x − 7 ) = 7 ⋅ 1 0 n − 1
We did this by subtracting ( 1 0 x − 7 ) from both sides.
And now we need to combine like terms. First we need to multiply 5 x by 1 0 1 0 to get a common denominator, leaving us with 1 0 5 0 x − x − 7 = 7 ⋅ 1 0 n − 1 . This simplifies to:
1 0 4 9 x − 7 = 7 ⋅ 1 0 n − 1
Let's get rid of that pesky fraction though, no one likes fractions. We multiply both sides by 10 to give us:
4 9 x − 7 = 7 ⋅ 1 0 n − 1 ⋅ 1 0
Of course we know based on the properties of exponents that 1 0 n − 1 ⋅ 1 0 = 7 ⋅ 1 0 n − 1 + 1 , which simplifies to 7 ⋅ 1 0 n .
Let's put it all together:
4 9 x − 7 = 7 ⋅ 1 0 n
Okay now that we have this equation in simpler terms, let's start playing with that "n" number. Remember this is the number of digits in x. And remember x must be a whole number by definition, anything that is not a whole number cannot be our solution.
If we substitute 1 for n:
4 9 x − 7 = 7 ⋅ 1 0 1 4 9 x − 7 = 7 0 4 9 x = 7 0 − 7 4 9 x = 6 3 x ≈ 1 . 2 8 5 7 1
If we substitute 2 for n:
49x-7=7\cdot { 10 }^{ 2 }\\ 49x-7=700\\ 49x=693\\ x\approx 14.14286
If w substitute 3 for n:
49x-7=7\cdot { 10 }^{ 3 }\\ 49x-7=7000\\ 49x=6993\\ x\approx 142.714
If we substitute 4 for n:
4 9 x − 7 = 7 ⋅ 1 0 4 4 9 x − 7 = 7 0 0 0 0 4 9 x = 6 9 9 9 3 x ≈ 1 4 2 8 . 4 2 8
If we substitute 5 for n:
4 9 x − 7 = 7 ⋅ 1 0 5 4 9 x − 7 = 7 0 0 0 0 0 4 9 x = 6 9 9 9 9 3 x ≈ 1 4 2 8 5 . 5 7 1 4
If we substitute 6 for n:
4 9 x − 7 = 7 ⋅ 1 0 6 4 9 x − 7 = 7 0 0 0 0 0 4 9 x = 6 9 9 9 9 9 3 x = 1 4 2 8 5 7
And at last we have the correct answer! x = 1 4 2 8 5 7
I know this is a number theory problem, but please bear with my programming solution (Python solution). I felt there were too many cases to consider and I'm really looking forward to a person who can write a purely mathematical solution.
num = 0
#this number represents the number with the property outlined in the problem statement
counter = 0
#this number controls the while loop, if it is 0, it increases the value of "num", if it is 1, it stops
reverse = 0
#this is number "num", but the 7 is moved to beginning of "num"
while counter <> 1:
num = num + 1
if (num % 10) == 7: #test if the number ends in 7
reverse = int("7" + str(num/10)) #move '7' to the beginning of the number
if num * 5 == reverse: #test the property outlined in the problem statement
print num
counter = counter + 1 #if it finds the number, stop loop, output num
Upon running the program, it returns 142857 as the answer.
Its pretty cool.Thank you.
Hey, I've posted a mathematical solution for you that greatly reduces the number of possible solutions...as a matter of fact in this case you only have to test 6 numbers!
Log in to reply
I can't believe I didn't think of your solution. Good job!
It is sure that the no. ends with 7 & the previous digit of 7 is 5[ as the no is divisible by 5 when 7 jumps to the 1st position]
Let consider any no which ends with 7 & the previous one is 5
Let the no is abc57{you can take any no as your preference}
According to the condition , the new no is 7abc5
Then,
70000+1000a+100b+10c+5=5×[10000a+1000b+100c+50+7]
490×[100a+10b+c]=70000-280=69720
100a+10b+c=69720/490=142.285
As a,b,c are integers so 100a+10b+c can't be a fraction.
So to satisfy the condition ,
[{7×10^(n-1)-280}÷490]be an integer
As the no is minimum n=6 that satisfy the condition
Then ,
100a+10b+c=1428[(700000-280)/490=1428]
So, a=1, b=4 ,c=2, d=8
As the no is 142857.
Problem Loading...
Note Loading...
Set Loading...
Let x be the number after removing 7 from the actual number. Let n be the number of digits of x.
Then, the actual number = 1 0 x + 7 and the number on keeping 7 at the front = 7 × 1 0 n + x .
So, 5 ( 1 0 x + 7 ) = 7 × 1 0 n + x
On simplifying, 7 x = 1 0 n − 5
1 0 n − 5 will be off the form 999.....5 and must be a multiple of 7. I found it by using the inverse process of basic multiplication by keeping 5 at the unit's place and proceeding till the form 999.....5 is achieved.
Finally I got, 1 4 2 8 5 × 7 = 9 9 9 9 5
So, x = 1 4 2 8 5 and n = 5 .
And 1 4 2 8 5 7 × 5 = 7 1 4 2 8 5
So, the answer is 1 4 2 8 5 7 .