A particularly long integer ends with an 8. Shifting this 8 digit to the leftmost position creates a new number which is twice the original. Find the smallest possible value of the original number.
Clarification: This 8shift procedure looks as follows: $123{\color{#D61F06}8} \longrightarrow {\color{#D61F06}8}123.$
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
nonjavascript version of this page
. We're sorry about the hassle.
Very nice solution
That was a short multiplication when I went to school.
Can anyone clear it please with a solution??
Log in to reply
It's simple think this procedure as the following sequence a {n+1}=remain(2*a n,10)+quotient(2*a_{n1), 10) With a0=0 and a1=8. The value of this sequence gives the all digit of the solution.
I did that but gave up at 4210526, cuz i had no paper and was doing it in my head.
The answer is wrong. The question never stated "positive integer." The answer might be 421052631578947368, something more negative, or it may be unknown.
If the original number is $10x+8,$ then twice that number is $8 \cdot 10^n + x,$ where $n$ is the number of digits of $x.$ This leads to the equation $8(10^n2) = 19x.$ The smallest solution will use the smallest positive $n$ such that $10^n \equiv 2$ mod $19.$ Looking at powers of $10$ mod $19,$ we see that $10$ is a primitive root , and the smallest $n$ such that $10^n \equiv 2$ mod $19$ is $n=17.$ Checking $x = \frac{8(10^{17}2)}{19},$ we see that it does indeed have $17$ digits, so the answer is $10x+8 = \fbox{421052631578947368}.$
I did the same and so I don't thing this problem has to be considered as an advanced. I thing it is easyer than many intermediates.
This is about what I did. Didn't know the primitive root thing, so I wrote a Ruby script to try #s and 17 hit.
To phrase the problem mathematically, $\frac{x8}{10} + 8 \times 10^{n} = 2x$ , where x is our original number, and n is the amount of digits in our original number. $x8+8 \times 10^{n+1}=20x$
$8(10^{n+1}1)=19x$
$10^{n+1}1=\frac{19}{8}x$ (1)
The lefthand side of this equation evaluates to $9 \times$ a repunit of 1. As x is an integer, and clearly, 19 does not divide 9, we can see that 19 must divide the repunit of 1. A quick calculator trick can yield the smallest repunit that has this property.
$19 \times 5847953216374269=111111111111111111$ , a repunit with 18 digits
This tells us that $10^{n+1}1=111111111111111111 \times 9$
$10^{n+1}=10^{19}$
$n=18$
Sub into (1)
$(10^{19}1)\frac{8}{19}=x$
$x=421052631578947368$
And indeed, $\frac{842105263157894736}{2}=421052631578947368$
I would be interested to hear other solutions to this problem, preferably ones that do not require calculator tomfoolery
We diverged after 8*(10^(n+1)1) = 19x.
x should be the smallest integer such as : x=8*(10^(n+1)1)/19
So :
8*(10^(n+1)1) = 0 [19]
10^(n+1) = 1 [19]
By Fermat theorem, we know that 10^18=1[19]
18=3 * 3 * 2
So the smallest value for n+1 should be 2, 3, 6, 9 or 18.
It works only for 18, so n+1=18 and n=17
I could only follow up to "The lefthand side.." etc. How can you evaluate that?
Log in to reply
You could watch my answer below, using Fermat theorem. Otherwise I think the calculator trick is just to try to divide 11…[n time]…11 by 19, until it give a integer.
To evaluete the digit of x there is a procedure without use calculator. 8 (10^191)=79999999999999999999(one 7 follow by ninetenn 9) The quotient of this number with 19 gives x (into the bracket the digit of x) : 79/19 =(4) 19+3 39/19=(2) 19+1 19/19=(1) 19+0 09/19=(0) 19+9 99/19=(5) 19+4 49/19=(2) 19+11 119/19=(6) 19+5 59/19=(3) 19+2 29/19=(1) 19+10 109/19=(5) 19+14 149/19=(7) 19+16 169/19=(8) 19 +17 179/19=(9) 19+8 89/19=(4) 19+13 139/19=(7) 19+6 69/19=(3) 19+12 129/19=(6) 19+15 159/19=(8)*19+7
Let $n$ be the desired integer. We will use $\Vert$ to represent concatenation. We have $n=x\Vert8$ and $2n=8\Vert{x}$ for some integer $x$ . We can rewrite these expressions as $n=10x+8$ and $2n=8*10^a+x$ for some integer $a$ . We perform some basic algebra: $2n=8*10^a+x\\ 2(10x+8)=8*10^a+x\\ 20x+16=8*10^a+x\\ 19x=8*10^a16\\ 19x=8*(10^a2)\\ \frac{19}{8}x=10^a2.$ Since $10^a2$ is an integer, $\frac{19}{8}x$ is also an integer. Since $8$ and $19$ are relatively prime, $b=\frac{x}{8}$ is an integer. So we have $19b=10^a2$ , or equivalently, $10^a \equiv 2 \pmod{19}$ . Multiplying by $10$ , we get $10^{a+1} \equiv 1 \pmod{19}$ . Since $19$ is prime, we can use Fermat's Little Theorem to find the smallest such $a$ that satisfies this congruence. Then, $a+1=18$ , so $a=17$ . (Presumably, we could find some extremely large integers for which the desired shifting property holds by instead setting $a=18^21,18^31,...$ .)
From here, it is a simple matter of solving for $n$ : $n=10x+8\\ n=10(8b)+8\\ n=10(8 * \frac{10^a2}{19})+8\\ n=10(8 * \frac{10^{17}2}{19})+8\\ n=\boxed{421052631578947368}.$
The following code solves the problem more generally for the question $\overline{abc\dots X} \times F = \overline{Xabc\dots},$ for any factor $F$ and any digit $X$ . The code stops after too many digits have been generated; it does not actually check if a solution is reached, but that can easily be mended.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 

Output:
1 

Well , how did you come to know that the number is of atmost 30 digits?
Log in to reply
Each pair $(d_i,c_i)$ uniquely determines the remainder of the sequence. Since there are only $10 \times 2 = 20$ possible values for the combination $(d_i,c_i)$ , the sequence must either reach $(8,0)$ within 20 steps or end up in a loop with period less than 20 steps.
A general approach can be as follows: Let the $n$ digit number be $10r+d$  $\textbf{(1)}$ After the last digit is moved to the first , the number looks like $10^{n+1}d+r$  $\textbf{(2)}$ . By Question, $2\times(10r+d) = 10^{n+1}d+r$ Solving for $d=8$ in the abobe expression we get $r=\frac{8.10^{n+1}16}{19}$ Since $19$ is prime so we have the following set of congruences: $8.10^{n+1} \equiv 16 \mod 19$ $10^{n+1} \equiv 2 \mod 19$ $5.10^n \equiv 1\mod19$ $10^n \equiv 4\mod19$ $25.10^{n2}\equiv 1\mod19$ $10^{n2} \equiv 16 \mod19$ $25.10^{n4} \equiv 4\mod19$ $625.10^{n6} \equiv 1\mod19$ $10^{n6} \equiv 9\mod19$ $10^{n7} \equiv 18 \mod19$
Now starting with $p=2$ and repeatedly applying the congruences modulo 19 i.e, $10^p \mod 19$ with increasing $p$ . We see that $p=9$ satisfies the last congruence in the above set of congruences(you could have satisfied any of the congruences in the above set but I chose the last one as it required the least effort) So, substituting $9=p=n7$ we get $n=16$ which is indeed the solution. Substitute this $n$ in $2$ to get $r$ and in $1$ substitute $r$ to get the original number
This is a "Mind Your Decisions" video that shows both the long multiplication solution John Ross showed and the mod 19 solution Patrick Corn showed (by letting a in the video to equal 8).
Problem Loading...
Note Loading...
Set Loading...
Just approach this problem like long multiplication.
$\large{\begin{array}{ccccccc} && & & & & \square & 8\\ \times && & & & & &2\\ \hline & & & & & &&\square &\\ \end{array}}$ The bottom box is a 6 which we can then write in the upper box. Continue this process (don't forget to carry the 1's) until you reach an 8 (without a carrying 1). This will give you the smallest possible solution of 421052631578947368.