OFFSET
3,1
COMMENTS
We conjecture that k in the definition exists for every n>=3.
a(n)=0 for n = 25, 37, 58, ... .
EXAMPLE
If n=3, evidently, k=5, since 2^5=32, s(5)= 3+2 = 5 = prime(3). So a(3)=5.
If n=25, then k=387, but s(387)>prime(25)=97, so a(25)=0 (the equation s(x)=97 has the smallest solution x=517).
PROG
(PARI) s(k) = my(sd = sumdigits(2^k)); sd/2^valuation(sd, 2);
a(n) = {p = prime(n); k = 1; while ((sk=s(k)) % p, k++); if (sk == p, k, 0); } \\ Michel Marcus, Dec 29 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vladimir Shevelev, Dec 20 2014
EXTENSIONS
More terms from Peter J. C. Moses, Dec 20 2014
STATUS
approved