How many integers $m$ such that $9^m - m$ is divisible by $65$ where $1\le m \le 1000$ $\newcommand{\Mod}[1]{\ (\mathrm{mod}\ #1)}$
My approach
Generally we want to solve: $$ 9^m \equiv m \Mod{65} $$ From Chinese remainder theorem we know that this is equivalent to: $$ 9^m \equiv m \Mod{13} \wedge 9^m \equiv m \Mod{5} $$
- After write some first elements from $9^m$ we see that $$ 9^m \text{ mod } 5 = \begin{cases} 4 \text{ when m is odd} \\ 1 \text{ when m is even} \end{cases}$$ so we are thinking about all numbers which have $6,9$ at first digit.
- After write some first elements from $9^m$ we see that $$ 9^m \text{ mod } 13 = \begin{cases} 9 \text{ when m = 3k+ 1} \\ 3\text{ when m = 3k+ 2} \\ 1\text{ when m = 3k} \end{cases} $$ we see that for $m=3k+1$ and for $m=3k+2$ there is no chance to have the same remainder. So we want every $m$ in form of $m=3k$ which is dividable by $13$. So we want each $m$ dividable by $39$. It will be: $$ 39, 78, 117, 156, 195, 234, 273, 312, 351, 390, 429, 468, 507, 546, 585, 624, 663, 702, 741, 780, 819, 858, 897, 936, 975 $$ We choose these number which pass condition in $(1)$ and we get $$39, 156, 429, 546, 819, 936, $$
but this is wrong answer... It should be $16$ numbers...
Hint:
As $65=13\cdot5$
$3^3\equiv1\pmod{13}\implies9^3\equiv1\implies$ord$_{13}9=3$
and similarly ord$_59=2$
$\implies$ord$_{65}=[3,2]=6$
This is instantly available from http://mathworld.wolfram.com/CarmichaelFunction.html
So, there can be $12/2$ unique values of $9^m=3^{2m}$
namely $0\le m<6$
$m\equiv0\pmod6,9^m\equiv1\pmod{65}$
So, for $m=6n,$
$9^m-m\equiv1-6n\pmod{65},n=11+65r,m=6(11+65r)$
For $m=6n+1$
$9^m-m\equiv9-(6n+1)\pmod{65}\iff3n\equiv4+65\iff n\equiv23,m=1+6(23+65r)$
Similarly check for $m=6n+2,6n+3,6n+4,6n+5$