This was asked by my maths lecturer a couple of years ago and ive been wracking my brains ever since:

Find a number that, when multiplied by 99 will give the original number but with a 1 at the beginning and a 1 at the end.

For example: 42546254 * 99 would equal 1425462541
(it doesn't, but it illustrates what the answer would look like)


$$112359550561797752809 \cdot 99 = 11123595505617977528091\;.$$

If you put what you say into an equation, it reads

$$10^n+1+10x=99x\;,$$ $$10^n+1=89x\;.$$

Then you just need to find an $n$ such that $10^n\equiv 88\pmod{89}$, and $n=22$ works.

| cite | improve this answer | |
  • 26
    $\begingroup$ It is perhaps worth mentioning that when looking for n fullfilling $10^n \equiv -1 \pmod{89}$ you also know that $10^{2n} \equiv 1 \pmod{89}$. By Fermat's little theorem you know that $10^{88} \equiv 1 \pmod {89}$, hence $2n\mid 88$, i.e. $n\mid 44$ holds for the smallest possible n. So you only need to try the divisors of 44. $\endgroup$ – Martin Sleziak Apr 5 '11 at 11:12
  • $\begingroup$ It may prove instructive to revisit your solution using the hint in my answer. $\endgroup$ – Gone Apr 5 '11 at 19:39
  • $\begingroup$ Can you explain how you created your original equation of 10^n+1+10x=99x? $\endgroup$ – Xonatron Jan 26 '12 at 20:38
  • 1
    $\begingroup$ @Matthew: "Find a number that, when multiplied by 99 will give the original number but with a $1$ at the beginning and a $1$ at the end." The right-hand side, $99x$, corresponds to the first part of that sentence. The left-hand side, $10^n+1+10x$, corresponds to the second part of the sentence: Appending a digit $1$ at the end of a number multiplies it by $10$ and adds $1$, and appending a digit $1$ at the beginning adds $10^n$, where $n$ is the number of digits. $\endgroup$ – joriki Sep 30 '12 at 12:21
  • $\begingroup$ @joriki Thanks, for the clarification and I deleted the comments. I will also delete this comment. $\endgroup$ – user572932 Jul 25 '18 at 11:56

A down-to-earth way of finding the answer is to write the equation as $100x - x = 1x1$, or $1x1 + x = 100 x$. So if $x=abc\dots xyz$, then

+  abc...xyz

This means that the last digit $z$ must be 9, so we now have

+  abc...xy9

And from this we see that y=0, so that

+  abc...x09

Hence x=8, and so on. After 21 steps you reach

+  112359550561797752809

and then you're done.

| cite | improve this answer | |
  • 1
    $\begingroup$ could you explain this in a little more detail? im having trouble following what you're doing... $\endgroup$ – Tom Apr 5 '11 at 13:33
  • 3
    $\begingroup$ I appreciate the down-to-earth method! This could have been a "challenge problem" for a gifted elementary school student, but who wants to hear a kid invoke F.L.T.?!?! :) $\endgroup$ – The Chaz 2.0 Apr 5 '11 at 13:34
  • 1
    $\begingroup$ @Tom: OK, I'll try. I hope the setup is clear: you want to find digits, a, b, ..., x so that the addition works out as indicated. Starting from the right, we see from the last column that 1+z must give something ending in zero, and the only way this can happen is as 1+9=10. So z=9, and we carry 1 to the next column. And we also replace all three z's with 9. This gives us the situation in the second diagram. Now the sum of the second column from the right is 1 (from the carry) + 9 (from the z) + y (still unknown) = something ending in 0. Already 1+9=10, so y=0. (Cont.) $\endgroup$ – Hans Lundmark Apr 5 '11 at 14:21
  • $\begingroup$ Replace all y's by zeros, and carry the one to the next column. Then you're in the situation shown in the third diagram. Here 1 (from the carry) + 0 (from the y) + x (still unknown) = something ending in 9 (from the z two steps earlier!). This must be 1+0+8=9, so x=8, and this time we don't have to carry anything to the next column. And so on... $\endgroup$ – Hans Lundmark Apr 5 '11 at 14:23
  • $\begingroup$ It may prove instructive to revisit your solution using the hint in my answer. $\endgroup$ – Gone Apr 5 '11 at 19:39

It was shown that $\rm\ x = 112359550561797752809\:.$
Notice that $1/89\ =\ 0.0112359550561797752808988\ldots$

EXERCISE $\: $ Explain it (this, perhaps, is the point of the OP).

NOTE $\ $ This is closely connected with fibonacci numbers. Hint:

$\rm\quad\quad\quad x^n\ =\ f_n\ x + f_{n-1}\ (mod\ x^2-x-1)\ $

and note $\rm\ f_{11} = 89\ $ which is $\rm\ x^2-x-1\ $ for $\rm\ x = 10\:.$

| cite | improve this answer | |
  • 4
    $\begingroup$ 1/89 is one of my favourite decimal expansions: it's the fibonacci sequence! 00112358(13)---oops, 13 is too big so carry one, change the 8 to a 9, etc etc. If you think about it this way then it's a miracle that it recurs :-) $\endgroup$ – Kevin Buzzard Apr 5 '11 at 20:31
  • $\begingroup$ @Kevin: Yes, I was going to mention that. In fact here is a further hint for readers: $\rm\ x^n\ =\ f_n\ x + f_{n-1}\ (mod\ x^2-x-1)\ $ and $\rm\ f_{11} = 89 = x^2-x-1,\ x = 10\:.$ $\endgroup$ – Gone Apr 5 '11 at 20:37
  • $\begingroup$ @Kevin: Thanks for these interesting pointers. I noticed the Fibonacci-like pattern in the residues of $10^n$ mod $89$ when I was looking for the solution, and I put it on a mental shelf as "something to be looked into some time" :-) $\endgroup$ – joriki Apr 5 '11 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.