We define a positive integer
$N$
to be an
*
$n$
-digit automorphic number
*
if the last
$n$
digits of
$N,N^2, N^3,\ldots$
are all equal, and that
$N$
has exactly
$n$
digits.

For example, 376 is a 3-digit automorphic number because $376^2 = 141\underline{376} , 376^3 = 53157\underline{376}, 376^4=19987173\underline{376}$ and so on.

What is the value of a 4-digit automorphic number?

The answer is 9376.

**
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.

We know that if a number n is a 4 digit automorphic number then n^2=10000x+n for x is a positive integer because the last 4 digits of 10000x is 0000 and adding n makes those last 4 digits n since n is going to be our automorphic number.So n(n-1)=10000x. What this means is that n=0 mod 625 and n=1 mod 16 or n=1 mod 625 and n=0 mod 16.

Case 1 The first case says that n=0 mod 625 and n=1 mod 16.So n=625k for k is a positive integer.We know that the integer n would equal to 1 mod 16 and that because n=625k, 625k mod 16 is equal to 1 mod 16. We know that 625k mod 16 is equal to k mod 16 because 624k=16(39k).So k=1 and n=625(1).But since 625 is not a 4 digit number, 625 is not the answer.k could also be 17 or 33 etc but the smallest value that might also work, 17, makes n=625(17)=10625 and this has 5 digits so 10625 is not the answer.Even though no possible value of k will work then, we still have case 2.

Case 2 The second case says that n=625a+1 and n=16f where f is a positive integer.We know that n mod 16= 0 mod 16 because n=16f and 625a +1 mod 16 is a+1 mod 16 so a+1=0 but that means a=-1 but a+1 could also equal to any multiple of 16 so we assume that a+1=16, this makes a=15, if we say that a+1=32, a=31 and 625(31) +1=19376 so we know that the numbers 32, 48, 64 and so on wont work but if a+1=16, a=15 and n=15(625)+1 which is 9376 so our answer is 9376.Note that there is the 3 digit automorphic number 376 and that 9376 has its last 3 digits 376!