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-3 of 3 results.

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

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

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 28, 30, 31, 45, 46, 47, 57, 58, 59, 71, 77, 99, 108
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1998

Keywords

Examples

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

Crossrefs

Cf. numbers n such that decimal expansion of 2^n contains no k: A007377 (k=0), A035057 (k=1), A034293 (k=2), A035058 (k=3), A035059 (k=4), A035060 (k=5), A035061 (k=6), A035062 (k=7), A035063 (k=8), this sequence (k=9).
Indices of zeros in A065744 (number of 9s in digits of 2^n).

Programs

Extensions

Initial 0 added by Vincenzo Librandi, May 06 2015
Removed keyword "fini" at the suggestion of Nathan Fox, since it is only a conjecture that this sequence contains only finitely many terms. - N. J. A. Sloane, Mar 03 2016

A291460 Even numbers m whose decimal expansion contains the decimal expansion of the greatest odd divisor of m as a substring.

Original entry on oeis.org

16, 128, 384, 512, 1024, 1536, 1792, 2176, 2560, 2912, 3072, 5120, 7168, 8192, 9216, 11264, 13312, 15360, 15616, 16384, 17408, 19456, 21504, 23552, 25600, 27648, 28672, 29696, 31744, 33792, 35840, 37376, 37888, 39936, 41984, 43392, 57344, 66560, 90112, 98304
Offset: 1

Views

Author

Bobby Jacobs, Aug 24 2017

Keywords

Comments

43392 and 443392 are both in this sequence because 43392 = 2^7*339 and 443392 = 2^10*433. Removing the first digit of 443392 gives 43392. Are there any other numbers in this sequence such that removing the first digit gives another number in the sequence?
Every number of the form 29090...90912 is in this sequence because 2912 = 2^5*91, 290912 = 2^5*9091, 29090912 = 2^5*909091, and so on.
Sequence is infinite since it contains infinite subsequences, like the numbers of the form 7*2^(20*k-5) for k > 0. - Giovanni Resta, Aug 25 2017
From Robert G. Wilson v, Aug 25 2017: (Start)
Trivially all powers of two which contain the digit 1 are terms, see A035057.
Number of terms less than 10^k: 0, 1, 4, 15, 40, 57, 76, 108, 146, 194, 258, 336, 447, etc. (End)

Examples

			The greatest odd divisor of 1792 = 2^8*7 is 7, which is in 1(7)92. Therefore, 1792 is in this sequence.
2^10*x = 1024*x contains x as a substring for all x from 1 to 41. Therefore, 1024*x is in this sequence for all odd x from 1 to 41.
		

Crossrefs

Programs

  • Mathematica
    inQ[n_] := StringPosition[ToString[n], ToString[n/2^IntegerExponent[n, 2]]] != {}; Select[2 Range[50000], inQ] (* Giovanni Resta, Aug 24 2017 and slightly modified by Robert G. Wilson v, Aug 25 2017 *)
  • PARI
    is(n)=if(n%2, return(0)); my(r=n>>valuation(n, 2), m=Mod(r, 10^#digits(r))); while(n>=r, if(n==m, return(1)); n\=10); 0 \\ Charles R Greathouse IV, Aug 26 2017
    
  • Python
    A291460_list = [2*x for x in range(1,10**6) if str(int(bin(x).rstrip('0'),2)) in str(2*x)] # Chai Wah Wu, Aug 31 2017

Extensions

More terms from Giovanni Resta, Aug 24 2017
Name edited by Felix Fröhlich, Aug 24 2017
Showing 1-3 of 3 results.