cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A095412 Exponents k such that the sum of decimal digits of 2^k is also a power of 2.

Original entry on oeis.org

0, 1, 2, 3, 9, 36, 85, 176, 194, 200, 375, 1517, 1523, 3042, 5953, 6043, 6109, 12068, 12104, 96251, 193734, 386797, 387589, 1545477, 3092224, 3098800, 6188717, 6191693, 6199469, 24753865, 99084345
Offset: 1

Views

Author

Labos Elemer, Jun 21 2004

Keywords

Examples

			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.
		

Crossrefs

Cf. A001370 (sum of digits of 2^n).

Programs

  • Mathematica
    Do[If[IntegerQ[Log[2, Plus@@IntegerDigits[2^n]]], Print[n] ], {n, 0, 10^6}];
  • PARI
    isp(n) = (n==1) || (n==2) || (ispower(n,,&k) && (k==2));
    isok(n) = isp(sumdigits(2^n)); \\ Michel Marcus, Apr 25 2017

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