OFFSET
0,43
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..20000 (first 1001 terms from Harry J. Smith)
FORMULA
EXAMPLE
2^31 = 2147483648 so a(31) = 0 and 2^42 = 4398046511104 so a(42) = 2.
MATHEMATICA
Table[ Count[ IntegerDigits[2^n], 0], {n, 0, 100} ]
DigitCount[2^Range[0, 110], 10, 0] (* Harvey P. Dale, Nov 20 2011 *)
PROG
(PARI) A027870(n)=#select(d->!d, digits(2^n)) \\ M. F. Hasler, Jun 14 2018
(Haskell) a027870 = a055641 . a000079 -- Reinhard Zumkeller, Apr 30 2013
(Python)
def A027870(n):
return str(2**n).count('0') # Chai Wah Wu, Feb 14 2020
CROSSREFS
KEYWORD
nonn,base,changed
AUTHOR
EXTENSIONS
a(99)-a(104) from Harry J. Smith, Oct 27 2009
STATUS
approved