A067499 Powers of 2 with digit sum also a power of 2.
1, 2, 4, 8, 512, 68719476736, 38685626227668133590597632, 95780971304118053647396689196894323976171195136475136, 25108406941546723055343157692830665664409421777856138051584, 1606938044258990275541962092341162602522202993782792835301376
Offset: 1
Examples
512 = 2^9 and 5+1+2 = 8 = 2^3. 68719476736 = 2^36, sum of digits = 64 = 2^6.
Links
- Robert Israel, Table of n, a(n) for n = 1..13
Programs
-
Maple
with(numtheory): pow2 := [2^i$ i=1..2000]: for n from 1 to 1000 do L1 := convert(2^n, base, 10): if member(sum(L1[i], i=1..nops(L1)), pow2) then printf(`%d,`,2^n) fi: od: # James Sellers, Apr 19 2001
-
Mathematica
Select[Table[2^n,{n,0,250}],IntegerQ[Log[2,Total[IntegerDigits[#]]]] &] (* Jayanta Basu, May 19 2013 *) Module[{nn=200,pw2},pw2=2^Range[0,nn];Select[pw2,MemberQ[pw2,Total[ IntegerDigits[ #]]]&]] (* Harvey P. Dale, Dec 01 2022 *)
Extensions
More terms from James Sellers, Apr 19 2001
Comments