OFFSET
1,2
LINKS
Marius A. Burtea, Table of n, a(n) for n = 1..10535
MATHEMATICA
Select[Range[400], IntegerQ[Log2[Total[IntegerDigits[#]]]]&] (* Harvey P. Dale, Jul 22 2023 *)
PROG
(Magma) [1] cat [k: k in [2..341] | PrimeDivisors(&+Intseq(k)) eq [2] or &+Intseq(k) eq 1]; // Marius A. Burtea, Jun 11 2019
(PARI) ispp(n) = (n==1) || (isprimepower(n, &p) && (p==2));
isok(n) = ispp(sumdigits(n)); \\ Michel Marcus, Jun 11 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
More terms from Scott Lindhurst (ScottL(AT)alumni.princeton.edu)
Checked by Neven Juric (neven.juric(AT)apis-it.hr), Feb 04 2008
STATUS
approved