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.

Showing 1-10 of 10 results.

A027870 Number of zero digits in 2^n.

Original entry on oeis.org

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

Views

Author

Keywords

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

Examples

			2^31 = 2147483648 so a(31) = 0 and 2^42 = 4398046511104 so a(42) = 2.
		

Crossrefs

Cf. A000079 (powers of 2), A007377 (2^n has no zeros).
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)).

Programs

  • Haskell
    a027870 = a055641 . a000079  -- Reinhard Zumkeller, Apr 30 2013
    
  • Mathematica
    Table[ Count[ IntegerDigits[2^n], 0], {n, 0, 100} ]
    DigitCount[2^Range[0,110],10,0] (* Harvey P. Dale, Nov 20 2011 *)
  • PARI
    A027870(n)=#select(d->!d,digits(2^n)) \\ M. F. Hasler, Jun 14 2018
    
  • Python
    def A027870(n):
        return str(2**n).count('0') # Chai Wah Wu, Feb 14 2020

Formula

a(n) = A055641(A000079(n)). - Reinhard Zumkeller, Apr 30 2013
a(A007377(n)) = 0; A224782(n) <= a(n). - Reinhard Zumkeller, Apr 30 2013

Extensions

Edited by M. F. Hasler, Jul 09 2025

A065710 Number of 2's in the decimal expansion of 2^n.

Original entry on oeis.org

0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 2, 2, 0, 2, 0, 0, 1, 1, 0, 2, 1, 1, 1, 1, 2, 1, 0, 0, 0, 1, 1, 0, 1, 4, 0, 3, 1, 2, 0, 1, 1, 3, 3, 3, 1, 2, 0, 1, 2, 1, 2, 2, 2, 3, 1, 3, 0, 2, 2, 3, 3, 2, 2, 4, 4, 4, 0, 1, 2, 4, 3, 1, 3, 6, 2, 0, 2, 4, 4, 4, 2, 3, 6, 2, 1, 5, 1, 2, 4, 4, 1, 2, 6
Offset: 0

Views

Author

Benoit Cloitre, Dec 04 2001

Keywords

Comments

See A034293 for indices of zeros: It is conjectured that the last 0 appears at index 168 = A094776(2). More generally, I conjecture that any value x = 0, 1, 2, 3, ... occurs only a finite number of times N(x) = 23, 35, 28, 26, 41, 37, 34, 26, 34, 38, 33, 41, ... in this sequence, for the last time at a well defined index i(x) = 168, 176, 186, 268, 423, 361, 472, 555, 470, 562, 563, 735, .... - M. F. Hasler, Feb 10 2023, edited by M. F. Hasler, Jul 09 2025

Examples

			2^31 = 2147483648 so a(31) = 1.
		

Crossrefs

Cf. 0's A027870, 1's A065712, 3's A065714, 4's A065715, 5's A065716, 6's A065717, 7's A065718, 8's A065719, 9's A065744.
Cf. A034293, A094776 (largest k for which 2^k has no digit n).

Programs

  • Maple
    seq(numboccur(2, convert(2^n,base,10)),n=0..100); # Robert Israel, Jul 09 2025
  • Mathematica
    Table[ Count[ IntegerDigits[2^n], 2], {n, 0, 100} ]
  • PARI
    a(n) = #select(x->(x==2), digits(2^n)); \\ Michel Marcus, Jun 15 2018
    
  • Python
    def A065710(n):
        return str(2**n).count('2') # Chai Wah Wu, Feb 14 2020

Formula

a(n) = a(floor(n/10)) + [n == 2 (mod 10)], where [...] is the Iverson bracket. - M. F. Hasler, Feb 10 2023

Extensions

More terms from Robert G. Wilson v, Dec 07 2001

A065712 Number of 1's in decimal expansion of 2^n.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 1, 0, 1, 1, 1, 0, 2, 0, 1, 2, 0, 1, 2, 1, 0, 0, 3, 0, 1, 1, 0, 1, 3, 1, 3, 0, 3, 1, 1, 1, 2, 2, 2, 2, 0, 1, 3, 1, 0, 4, 4, 0, 3, 1, 3, 0, 3, 3, 0, 2, 2, 3, 6, 3, 1, 0, 2, 3, 3, 5, 1, 1, 5, 3, 1, 2, 5, 1, 4, 2, 2, 5, 2, 0, 5, 3, 1, 6, 2, 2, 4, 5, 2
Offset: 0

Views

Author

Benoit Cloitre, Dec 04 2001

Keywords

Comments

I conjecture that any value x = 0, 1, 2, ... occurs only a finite number of times N(x) = 26, 34, 30, 40, 26, 33, 39, 30, 30, 30, 38, ... in this sequence, for the last time at well defined indices i(x) = 91, 152, 185, 412, 245, 505, 346, 422, 499, 565, 529, 575, ... - M. F. Hasler, Jul 09 2025

Examples

			2^17 = 131072 so a(17) = 2.
		

Crossrefs

Cf. A027870 (0'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).
Indices of zeros are listed in A035057 (2^n does not contain the digit 1).

Programs

  • Mathematica
    Table[ Count[ IntegerDigits[2^n], 1], {n, 0, 100} ]
    Table[DigitCount[2^n,10,1],{n,0,120}] (* Harvey P. Dale, Aug 15 2014 *)
  • PARI
    a(n) = #select(x->(x==1), digits(2^n)); \\ Michel Marcus, Jun 15 2018
    
  • Python
    def A065712(n):
        return str(2**n).count('1') # Chai Wah Wu, Feb 14 2020

Extensions

More terms from Robert G. Wilson v, Dec 07 2001

A065715 Number of 4's in decimal expansion of 2^n.

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 2, 1, 1, 0, 3, 0, 0, 2, 1, 1, 2, 0, 2, 3, 2, 1, 1, 1, 1, 2, 3, 1, 0, 0, 3, 0, 3, 1, 3, 2, 2, 2, 2, 1, 2, 2, 3, 0, 1, 2, 2, 3, 2, 1, 3, 1, 4, 3, 3, 2, 1, 0, 3, 4, 3, 4, 4, 0, 2, 2, 4, 3, 2, 3, 4, 3, 2, 0, 2, 4, 3, 3, 4, 5, 3, 2, 3, 1, 3, 1, 3, 3, 2
Offset: 0

Views

Author

Benoit Cloitre, Dec 04 2001

Keywords

Comments

2^10 = 1024 so a(10)=1.

Crossrefs

Cf. 0's A027870, 1's A065712, 2's A065710, 3's A065714, 5's A065716, 6's A065717, 7's A065718, 8's A065719, 9's A065744.

Programs

  • Mathematica
    Table[ Count[ IntegerDigits[2^n], 4], {n, 0, 100} ]
  • PARI
    a(n) = #select(x->(x==4), digits(2^n)); \\ Michel Marcus, Jun 15 2018
    
  • Python
    def A065715(n):
        return str(2**n).count('4') # Chai Wah Wu, Feb 14 2020

Extensions

More terms from Robert G. Wilson v, Dec 07 2001

A065719 Number of 8's in decimal expansion of 2^n.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 2, 1, 0, 0, 4, 0, 0, 2, 1, 1, 1, 1, 2, 0, 2, 2, 2, 1, 1, 1, 4, 0, 0, 1, 2, 1, 4, 1, 3, 1, 0, 2, 3, 0, 0, 4, 3, 0, 4, 2, 2, 1, 1, 3, 3, 1, 3, 3, 2, 2, 2, 1, 4, 2, 0, 7, 3, 1, 4, 0, 4, 2, 2, 5, 1, 4, 3, 1, 1, 4, 1, 3, 6, 1, 1, 7, 3, 1, 5, 1, 4, 1
Offset: 0

Views

Author

Benoit Cloitre, Dec 04 2001

Keywords

Comments

2^7 = 128 so a(7)=1.

Crossrefs

Cf. 0's A027870, 1's A065712, 2's A065710, 3's A065714, 4's A065715, 5's A065716, 6's A065717, 7's A065718, 9's A065744.

Programs

  • Mathematica
    Table[ Count[ IntegerDigits[2^n], 8], {n, 0, 100} ]
    DigitCount[2^Range[0,100],10,8] (* Harvey P. Dale, Aug 02 2024 *)
  • PARI
    a(n) = #select(x->(x==8), digits(2^n)); \\ Michel Marcus, Jun 15 2018
    
  • Python
    def A065719(n):
        return str(2**n).count('8') # Chai Wah Wu, Feb 14 2020

Extensions

More terms from Robert G. Wilson v, Dec 07 2001

A065744 Number of 9's in the decimal expansion of 2^n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 3, 2, 1, 1, 1, 2, 1, 2, 2, 1, 2, 1, 0, 0, 0, 1, 3, 3, 2, 3, 5, 3, 3, 3, 0, 0, 0, 2, 3, 1, 1, 1, 2, 2, 3, 3, 2, 1, 0, 2, 5, 2, 3, 2, 0, 2, 2, 3, 3, 1, 4, 3, 2, 1, 2, 2, 4, 4, 2, 6, 8, 3, 3, 3, 1, 1, 0, 2
Offset: 0

Views

Author

Benoit Cloitre, Dec 04 2001

Keywords

Comments

See A035064 for the indices of zeros. I conjecture that any value x = 0, 1, 2, ... occurs only a finite number of times N(x) = 37, 27, 36, 46, 20, 31, 32, 30, 46, 29, 22, ... in this sequence, for the last time at well defined indices i(x) = 108, 197, 296, 277, 278, 315, 379, 555, 503, 504, 539, 696, 667, ... - M. F. Hasler, Jul 09 2025

Examples

			2^12 = 4096 so a(12)=1.
		

Crossrefs

Similar for other digits: A027870 (0's), A065712 (1's), A065710 (2's), A065714 (3's), A065715 (4's), A065716 (5's), A065717 (6's), A065718 (7's), A065719 (8's).
Cf. A035064 (2^n has no digit 9).

Programs

  • Mathematica
    Table[ Count[ IntegerDigits[2^n], 9], {n, 0, 100} ]
  • PARI
    Count(x,d)={ #select(t->t==d, digits(x)) }
    a(n) = Count(2^n, 9) \\ Harry J. Smith, Oct 27 2009
    
  • Python
    def A065744(n):
        return str(2**n).count('9')  # Chai Wah Wu, Feb 14 2020

Extensions

More terms from Robert G. Wilson v, Dec 07 2001

A065716 Number of 5's in decimal expansion of 2^n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 1, 1, 0, 0, 0, 2, 0, 0, 2, 1, 0, 0, 0, 2, 0, 1, 0, 1, 0, 3, 1, 4, 1, 0, 1, 1, 0, 2, 1, 2, 1, 2, 2, 1, 1, 0, 2, 4, 1, 2, 2, 2, 0, 2, 2, 0, 0, 3, 5, 5, 1, 0, 1, 1, 3, 2, 4, 3, 3, 2, 1, 3, 3, 2, 1, 3, 4, 4, 3, 1, 1, 3, 4, 1, 3, 2, 4, 5, 5, 2, 2
Offset: 0

Views

Author

Benoit Cloitre, Dec 04 2001

Keywords

Examples

			2^8 = 256 so a(8)=1.
		

Crossrefs

Cf. 0's A027870, 1's A065712, 2's A065710, 3's A065714, 4's A065715, 6's A065717, 7's A065718, 8's A065719, 9's A065744.

Programs

  • Mathematica
    Table[ Count[ IntegerDigits[2^n], 5], {n, 0, 100} ]
    DigitCount[#,10,5]&/@(2^Range[0,100]) (* Harvey P. Dale, Nov 13 2021 *)
  • PARI
    a(n) = #select(x->(x==5), digits(2^n)); \\ Michel Marcus, Jun 15 2018
    
  • Python
    def A065716(n):
        return str(2**n).count('5') # Chai Wah Wu, Feb 14 2020

Extensions

More terms from Robert G. Wilson v, Dec 07 2001

A065717 Number of 6's in decimal expansion of 2^n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 0, 0, 1, 2, 0, 2, 0, 2, 1, 0, 1, 2, 0, 1, 1, 3, 0, 1, 0, 2, 0, 1, 1, 2, 0, 3, 0, 3, 1, 2, 1, 2, 0, 0, 3, 1, 0, 1, 2, 4, 1, 3, 1, 3, 1, 4, 2, 1, 1, 1, 3, 6, 1, 1, 3, 2, 2, 3, 2, 4, 1, 2, 4, 3, 6, 3, 2, 2, 4, 0, 1, 4, 0, 3, 4, 3, 3, 2, 3, 5
Offset: 0

Views

Author

Benoit Cloitre, Dec 04 2001

Keywords

Examples

			2^8 = 256 so a(8)=1.
		

Crossrefs

Cf. 0's A027870, 1's A065712, 2's A065710, 3's A065714, 4's A065715, 5's A065716, 7's A065718, 8's A065719, 9's A065744.

Programs

  • Mathematica
    Table[ Count[ IntegerDigits[2^n], 6], {n, 0, 100} ]
    DigitCount[#,10,6]&/@(2^Range[0,100]) (* Harvey P. Dale, Feb 15 2020 *)
  • PARI
    a(n) = #select(x->(x==6), digits(2^n)); \\ Andrew Howroyd, Apr 25 2020
    
  • Python
    def A065717(n):
        return str(2**n).count('6') # Chai Wah Wu, Feb 14 2020

Extensions

More terms from Robert G. Wilson v, Dec 07 2001

A065718 Number of 7's in decimal expansion of 2^n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 3, 0, 1, 2, 0, 1, 2, 1, 1, 0, 2, 1, 3, 2, 3, 1, 3, 0, 0, 1, 1, 1, 4, 2, 3, 0, 0, 1, 2, 2, 0, 2, 4, 2, 3, 2, 1, 0, 2, 3, 3, 1, 3, 3, 2, 2, 2, 0, 1, 3, 2, 5, 3, 3, 2, 2, 3, 1, 3, 3, 1, 2, 4, 2, 2, 2, 2, 5, 2, 1, 2, 5, 2, 4, 4, 2, 3
Offset: 0

Views

Author

Benoit Cloitre, Dec 04 2001

Keywords

Examples

			2^15 = 32768 so a(15)=1.
		

Crossrefs

Cf. 0's A027870, 1's A065712, 2's A065710, 3's A065714, 4's A065715, 5's A065716, 6's A065717, 8's A065719, 9's A065744.

Programs

  • Mathematica
    Table[ Count[ IntegerDigits[2^n], 7], {n, 0, 100} ]
  • PARI
    a(n) = #select(x->(x==7), digits(2^n)); \\ Michel Marcus, Jun 15 2018
    
  • Python
    def A065718(n):
        return str(2**n).count('7') # Chai Wah Wu, Feb 14 2020

Extensions

More terms from Robert G. Wilson v, Dec 07 2001

A306112 Largest k such that 2^k has exactly n digits 0 (in base 10), conjectured.

Original entry on oeis.org

86, 229, 231, 359, 283, 357, 475, 476, 649, 733, 648, 696, 824, 634, 732, 890, 895, 848, 823, 929, 1092, 1091, 1239, 1201, 1224, 1210, 1141, 1339, 1240, 1282, 1395, 1449, 1416, 1408, 1616, 1524, 1727, 1725, 1553, 1942, 1907, 1945, 1870, 1724, 1972, 1965, 2075, 1983, 2114, 2257, 2256
Offset: 0

Views

Author

M. F. Hasler, Jun 22 2018

Keywords

Comments

a(0) is the largest term in A007377: exponents of powers of 2 without digit 0.
There is no proof for any of the terms, just as for any term of A020665 and many similar / related sequences. However, the search has been pushed to many magnitudes beyond the largest known term, and the probability of any of the terms being wrong is extremely small, cf., e.g., the Khovanova link.

Crossrefs

Cf. A031146: least k such that 2^k has n digits 0 in base 10.
Cf. A305942: number of k's such that 2^k has n digits 0.
Cf. A305932: row n lists exponents of 2^k with n digits 0.
Cf. A007377: { k | 2^k has no digit 0 } : row 0 of the above.
Cf. A238938: { 2^k having no digit 0 }.
Cf. A027870: number of 0's in 2^n (and A065712, A065710, A065714, A065715, A065716, A065717, A065718, A065719, A065744 for digits 1 .. 9).
Cf. A102483: 2^n contains no 0 in base 3.

Programs

  • PARI
    A306112_vec(nMax,M=99*nMax+199,x=2,a=vector(nMax+=2))={for(k=0,M,a[min(1+#select(d->!d,digits(x^k)),nMax)]=k);a[^-1]}
Showing 1-10 of 10 results.