# Almost Automorphic Number

$\Large 249^3 = 15438\underline{249}$

An automorphic number is defined as a positive integer $n$ such that the trailing digits of $n^m$, where $m$ is a positive integer, is $n$ itself for all $m>0$.

Let us define an almost automorphic number as a number where $n$ only appears as the trailing digits of $n^m$ for all odd $m>0$. How many almost automorphic numbers are less than 1000?

×