%I #49 Nov 28 2018 17:04:04
%S 3,43,343,2343,72343,172343,5172343,65172343,565172343,1565172343,
%T 11565172343,511565172343,5511565172343,65511565172343,
%U 265511565172343,1265511565172343,31265511565172343,331265511565172343,3331265511565172343,43331265511565172343
%N Numbers k such that 7^k ends with k.
%C Leftmost digit of a(n) is A133617(n-1) for n <= 30. - _Alois P. Heinz_, Nov 26 2018
%H J. Jimenez Urroz and J. Luis A. Yebra, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL12/Yebra/yebra4.html">On the equation a^x == x (mod b^n)</a>, J. Int. Seq. 12 (2009) #09.8.8.
%e 7^3 = 343, and it ends with 3, so 3 is a term.
%t 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 *)
%Y Cf. A133617.
%Y Sequence A064541 is similar, but uses the smallest single-digit prime as a base, unlike this one, which uses the largest single-digit prime as a base.
%K nonn,base
%O 1,1
%A _Ivan Stoykov_, Nov 26 2018