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 14 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

A094776 a(n) = largest k such that the decimal representation of 2^k does not contain the digit n.

Original entry on oeis.org

86, 91, 168, 153, 107, 71, 93, 71, 78, 108
Offset: 0

Views

Author

Michael Taktikos, Jun 09 2004

Keywords

Comments

These values are only conjectural.
The sequence could be extended to any nonnegative integer index n defining a(n) to be the largest k such that n does not appear as substring in the decimal expansion of 2^k. I conjecture that for n = 10, 11, 12, ... it continues (2000, 3020, 1942, 1465, 1859, 2507, 1950, 1849, 1850, ...). For example, curiously enough, the largest power of 2 in which the string "10" does not appear seems to be 2^2000. - M. F. Hasler, Feb 10 2023

Examples

			a(0) = 86 because 2^86 = 77371252455336267181195264 is conjectured to be the highest power of 2 that doesn't contain the digit 0.
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 71, p. 25, Ellipses, Paris 2008.

Crossrefs

Cf. A027870 and A065712 - A065744 (number of '0's, ..., '9's in 2^n).
Cf. A034293 (numbers k such that 2^k has no '2').

Programs

  • Mathematica
    f[n_] := Block[{a = {}, k = 1}, While[k < 10000, If[ Position[ Union[ IntegerDigits[ 2^k, 10]], n] == {}, AppendTo[a, k]]; k++ ]; a]; Table[ f[n][[ -1]], {n, 0, 9}] (* Robert G. Wilson v, Jun 12 2004 *)
  • PARI
    A094776(n,L=10*20^#Str(n))={forstep(k=L, 0, -1, foreach(digits(1<M. F. Hasler, Feb 13 2023
    
  • Python
    def A094776(n, L=0):
       n = str(n)
       for k in range(L if L else 10*20**len(n), 0, -1):
          if n not in str(2**k): return k # M. F. Hasler, Feb 13 2023

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

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
Showing 1-10 of 14 results. Next