OFFSET
1,1
COMMENTS
Leftmost digit of a(n) is A133617(n-1) for n <= 30. - Alois P. Heinz, Nov 26 2018
LINKS
J. Jimenez Urroz and J. Luis A. Yebra, On the equation a^x == x (mod b^n), J. Int. Seq. 12 (2009) #09.8.8.
EXAMPLE
7^3 = 343, and it ends with 3, so 3 is a term.
MATHEMATICA
a[1] = 3; a[n_] := a[n] = For[ida = IntegerDigits[a[n-1]]; k = 1, True, k++, idk = IntegerDigits[k]; pm = PowerMod[7, an = FromDigits[Join[idk, ida]], 10^IntegerLength[an]]; If[pm == an, Return[an]]]; Array[a, 20] (* after Jean-François Alcover in A064541 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ivan Stoykov, Nov 26 2018
STATUS
approved