OFFSET
1,1
COMMENTS
The n-th power analog of Keith numbers is like Keith numbers but starting from p^n to reach p. Consider the digits of p^n where p is prime. Take their sum and repeat the process, deleting the first addend and adding the previous sum. We are searching for the first prime p that after some number of iterations reaches a sum equal to p.
The only terms for n <= 100 whose values are still unknown are a(35), a(90), a(91) and a(95).
Paolo Lava asked for these numbers as a puzzle (see the Rivera link) and as a result a(61) = 11659149703 and a(81) = 200908021 were found.
LINKS
Carlos Rivera, Puzzle 1043. Another puzzle about Keith numbers, The Prime Puzzles & Problems Connection.
EXAMPLE
a(2) = 37 because 37^2 = 1369. Then 1+3+6+9 = 19 and 3+6+9+19 = 37.
MATHEMATICA
KeithPowQ[m_Integer, n_]:=Module[{b=IntegerDigits[m^n], s, k=0}, s=Total[b]; While[s<m, AppendTo[b, s]; k++; s=2*s-b[[k]]]; s==m];
KeithPow[n_]:=(k=1; While[!KeithPowQ[Prime@k, n], k++]; Prime@k); Array[KeithPow, 5] (* code modified from A007629 *)
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Giorgos Kalogeropoulos, Jul 03 2021
STATUS
approved