OFFSET
0,43
COMMENTS
I conjecture that any value x = 0, 1, 2, ... occurs only a finite number of times N(x) = 36, 41, 31, 34, 25, 32, 37, 23, 43, 47, 33, ... in this sequence, for the last time at well defined indices i(x) = 86, 229, 231, 359, 283, 357, 475, 476, 649, 733, 648, ... - M. F. Hasler, Jul 09 2025
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..20000 (first 1001 terms from Harry J. Smith, Oct 27 2009)
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
Similar for other digits: A065712 (1's), A065710 (2's), A065714 (3's), A065715 (4's), A065716 (5's), A065717 (6's), A065718 (7's), A065719 (8's), A065744 (9's).
Cf. A031146 (index of first appearance of n in this sequence), A094776 (index of last occurrence of digit n in powers of 2).
Cf. A305932 (table with n in row a(n)).
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Edited by M. F. Hasler, Jul 09 2025
STATUS
approved
