OFFSET
1,3
EXAMPLE
2^9 = 512 with digit sum = 8;
2^36 = 68719476736 with digit sum = 64;
2^85 = 38685626227668133590597632 with digit sum = 128;
2^96251 has a decimal digit sum of 131072.
MATHEMATICA
Do[If[IntegerQ[Log[2, Plus@@IntegerDigits[2^n]]], Print[n] ], {n, 0, 10^6}];
PROG
(PARI) isp(n) = (n==1) || (n==2) || (ispower(n, , &k) && (k==2));
isok(n) = isp(sumdigits(2^n)); \\ Michel Marcus, Apr 25 2017
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Labos Elemer, Jun 21 2004
EXTENSIONS
More terms from Ryan Propper, Jun 13 2006
a(21)-a(23) from Ray Chandler, Jun 16 2006
a(24)-a(29) from Jon E. Schoenfield, Jul 22 2006
a(30) from Giovanni Resta, Apr 24 2017
a(31) from Bert Dobbelaere, Feb 22 2019
Offset corrected by Jon E. Schoenfield, Nov 25 2022
STATUS
approved
