[Math] the smallest natural number n

contest-mathdecimal-expansionelementary-number-theorynumber theory

What is the smallest natural number n for which there is a natural k, such that, the lasts 2012 digit in the representation decimal of $n^k$ are equal to 1?

I don't even know how to start with it …

Best Answer

Using a quick search with my computer, here’s what I found so far :

Looking only at the last digit, some power of $n$ must be congruent to $1$ modulo $10$, so $n$ must be congruent to $1,3,7$ or $9$ modulo $10$.

Looking at the last two digits, some power of $n$ must be congruent to $11$ modulo $100$, so $n$ must be congruent to $11,31,71$ or $91$ modulo $100$.

Looking at the last three digits, ome power of $n$ must be congruent to $111$ modulo $1000$, so $n$ must be congruent to one of $31, 71, 111, 191, 231, 271, 311, 391, 431, 471, 511, 591, 631, 671, 711, 791, 831, 871, 911, 991$ modulo $1000$.

Looking at the last four digits, ome power of $n$ must be congruent to $1111$ modulo $10000$, so $n$ must be congruent to one of $71, 1031, 2071, 3031, 4071, 5031, 6071, 7031, 8071, 9031$ modulo $10000$.

Do you see the pattern in those sequences ?