login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A027870
Number of zero digits in 2^n.
32
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 3, 1, 1, 1, 1, 1, 0, 1, 0, 2, 3, 2, 2, 2, 1, 1, 2, 2, 3, 2, 2, 2, 1, 1, 0, 1, 3, 3, 1, 0, 1, 1, 1, 0, 0, 2, 4, 2, 0, 2, 3, 1, 1, 0, 3, 5, 3, 3, 4, 2, 3, 4, 1, 1, 4, 5, 5, 6, 6, 7, 5, 5
OFFSET
0,43
COMMENTS
a(A007377(n)) = 0; A224782(n) <= a(n). - Reinhard Zumkeller, Apr 30 2013
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..20000 (first 1001 terms from Harry J. Smith)
FORMULA
a(n) = A055641(A000079(n)). - Reinhard Zumkeller, Apr 30 2013
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
Cf. A007377, 1's A065712, 2's A065710, 3's A065714, 4's A065715, 5's A065716, 6's A065717, 7's A065718, 8's A065719, 9's A065744.
Cf. A031146: index of first appearence of n in this sequence.
Cf. A305932: table with n in row a(n).
Sequence in context: A352195 A321895 A321899 * A357526 A070077 A337200
KEYWORD
nonn,base,changed
EXTENSIONS
a(99)-a(104) from Harry J. Smith, Oct 27 2009
STATUS
approved