When the digit is placed at the beginning and end of a positive integer N, the new number is 99*N.

Find the smallest value of N.

let the digit be d and the length of N be m-2.

Then d*10^m + 10N + d = 99N

so d(1+10^m)/89 = N

since 89 is prime, it must divide (1+10^m)

In other word, 10^m = 88 (mod 89)

By using excel, and multiplying the previous remainder mod 89 by 10, we can see that 10^23 = 88 mod n.

I don't have enough precision to finish, and don't feel like doing it by hand, but calculate (1+10^23)/89 and multiply it by the smallest digit necessary to make it a length 21 number.

That should be the sought after N.

*Edited on ***July 11, 2015, 12:16 pm**