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 20 results. Next

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

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

A065714 Number of 3's in decimal expansion of 2^n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 3, 0, 1, 1, 1, 1, 1, 0, 1, 0, 4, 1, 3, 0, 1, 0, 1, 1, 1, 0, 3, 1, 3, 0, 2, 0, 1, 2, 0, 1, 2, 2, 0, 2, 3, 0, 4, 1, 3, 1, 4, 2, 1, 1, 1, 2, 3, 2, 3, 1, 2, 4, 1, 4, 3, 0, 3, 2, 3, 4, 4, 3, 3, 2, 1, 3, 0, 0, 4, 2, 2, 6, 1, 4, 4, 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) = 34, 34, 24, 34, 39, 34, 35, 34, 35, 32, 33, 31, ... in this sequence, for the last time at well defined indices i(x) = 153, 139, 226, 237, 308, 386, 413, 506, 461, 578, 644, 732, 857, 657, 743, 768, 784, 848, 906, ... - M. F. Hasler, Jul 09 2025

Examples

			2^5 = 32 so a(5)=1.
		

Crossrefs

Cf. A000079 (powers of 2), A035058 (2^n does not contain the digit 3).
Similar for other digits: A027870 (0's), A065712 (1's), A065710 (2's), this (3's), A065715 (4's), A065716 (5's), A065717 (6's), A065718 (7's), A065719 (8's), A065744 (9's).
Cf. A094776 (index of last occurrence of digit n in powers of 2).

Programs

  • Mathematica
    Table[ Count[ IntegerDigits[2^n], 3], {n, 0, 100} ]
  • PARI
    a(n) = #select(x->(x==3), digits(2^n)); \\ Michel Marcus, Jun 15 2018
    
  • Python
    def A065714(n):
        return str(2**n).count('3') # 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

A034293 Numbers k such that 2^k does not contain the digit 2 (probably finite).

Original entry on oeis.org

0, 2, 3, 4, 6, 12, 14, 16, 20, 22, 23, 26, 34, 35, 36, 39, 42, 46, 54, 64, 74, 83, 168
Offset: 1

Views

Author

Keywords

Comments

Is 168 the last term?
First row of A136291. - R. J. Mathar Apr 29 2008
Equivalently, indices of zeros in A065710. - M. F. Hasler, Feb 10 2023

Examples

			Here is 2^168, conjecturally the largest power of 2 that does not contain a 2: 374144419156711147060143317175368453031918731001856. - _N. J. A. Sloane_, Feb 10 2023
		

Crossrefs

Cf. A007377.
See also similar sequences listed in A035064.
Cf. A065710 (number of '2's in 2^n), A094776.

Programs

Formula

The last term is A094776(2), by definition. - M. F. Hasler, Feb 10 2023

Extensions

Edited by N. J. A. Sloane, Oct 03 2007
Removed keyword "fini" since it is only a conjecture that this sequence contains only finitely many terms. - Altug Alkan, May 07 2016
Showing 1-10 of 20 results. Next