OFFSET
1,1
COMMENTS
Let p be a prime other than 3. If p is not in the sequence, then either s(p,k_1) >= 25 or k_1 does not exist. We conjecture that k_1=k_1(p) exists for every prime p.
EXAMPLE
For p=7, s(p,1) = 7, s(p,2) = 4+9 = 13, s(p,3) = (3+4+3)/2 = 5. So 7 is a term.
For p=13, s(p,1) = 1, s(p,2) = 1, s(p,3) = 19, s(p,4) = 11, s(p,5) = 25. So 13 is not in the sequence.
MATHEMATICA
s[p_, k_] := Module[{s = Total[IntegerDigits[p^k]]}, s/2^IntegerExponent[s, 2]]; f5[p_] := Module[{k = 1}, While[! Divisible[s[p, k], 5], k++]; k]; ok5Q[p_] := s[p, f5[p]] == 5; Select[Range[1000], PrimeQ[#] && ok5Q[#] &] (* Amiram Eldar, Dec 07 2018 *)
PROG
(PARI) s(p, k) = my(s=sumdigits(p^k)); s >> valuation(s, 2);
f5(p) = my(k=1); while(s(p, k) % 5, k++); k;
isok5(p) = s(p, f5(p)) == 5;
lista5(nn) = forprime(p=2, nn, if (isok5(p), print1(p, ", "))); \\ Michel Marcus, Dec 07 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vladimir Shevelev, Dec 11 2014
EXTENSIONS
More terms from Peter J. C. Moses, Dec 11 2014
STATUS
approved