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.

Previous Showing 21-26 of 26 results.

A129344 a(n) is the number of powers of 2 that have n decimal digits.

Original entry on oeis.org

4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 3, 4, 3, 3
Offset: 1

Views

Author

Tanya Khovanova, May 28 2007

Keywords

Comments

Ignoring the first term, first differences of A066343. - Andrew Woods, Jun 10 2013

Examples

			a(1) is 4 because there are 4 one-digit powers of 2: 1, 2, 4, 8.
		

Crossrefs

First differences of A067497.

Programs

  • Mathematica
    Table[Transpose[ Select[Table[{n, 2^n}, {n, 0, 310}], IntegerDigits[ #[[2]]][[1]] == 1 &]][[1]][[k]] - Transpose[ Select[Table[{n, 2^n}, {n, 0, 310}], IntegerDigits[ #[[2]]][[1]] == 1 &]][[1]][[k - 1]], {k, 2, 94}]
    Join[{4}, Differences @ Table[Floor[n*Log2[10]], {n, 100}]] (* Amiram Eldar, Apr 09 2021 *)
  • PARI
    a(n) = my(k=0, i=0); while(#Str(2^k)!=n, k++); while(#Str(2^k)==n, i++; k++); i \\ Felix Fröhlich, Jan 19 2016
    
  • Python
    def A129344(n): return -(m:=5**(n-1)).bit_length()+(5*m).bit_length()+1 if n>1 else 4 # Chai Wah Wu, Sep 08 2024

Formula

For n>1, a(n) = floor(n*L)-floor((n-1)*L) where L = log(10)/log(2). - Andrew Woods, Jun 10 2013
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = log_2(10) (A020862). - Amiram Eldar, Apr 09 2021

A137284 a(0)=1 and a(n) for n > 0 equals the minimal positive integer such that addition of 2^(-a(n)) to Sum_{k = 0,1,...,n-1} 2^(-a(k)) changes only trailing zeros in its decimal representation.

Original entry on oeis.org

1, 4, 14, 47, 157, 522, 1735, 5764, 19148, 63609, 211305, 701941, 2331798, 7746066, 25731875, 85479439, 283956550, 943283242, 3133519104, 10409325148, 34579029658, 114869050115, 381586724811, 1267603661786, 4210888217270, 13988267873380, 46468020047392
Offset: 0

Views

Author

Keywords

Comments

First and last nonzero decimal digits of 2^(-m) appear respectively at the ceiling(m/log_2(10))-th and m-th positions after the point. Hence a(n+1) equals the minimum solution to ceiling(x/log_2(10)) = a(n) + 1, which is x = ceiling(a(n)*log_2(10)).

Examples

			Start from 0;
0 + 2^(-1) = 0.5;
0.5 + 2^(-4) = 0.5625 (first digit "5" is equal to the decimal of previous number);
0.5625 + 2^(-14) = 0.56256103515625 (first digits "5625" are equal to the decimals of previous number);
etc.
		

Formula

a(n+1) = ceiling(a(n)*log_2(10)) = ceiling(a(n)*A020862). - Conjectured by R. J. Mathar, proved by Max Alekseyev

Extensions

Edited and extended by Max Alekseyev, May 13 2009

A242347 Number of decimal digits of A008559.

Original entry on oeis.org

1, 2, 4, 10, 31, 100, 330, 1093, 3628, 12049, 40023, 132951, 441651, 1467130, 4873698, 16190071, 53782249, 178660761, 593498199, 1971558339
Offset: 1

Views

Author

J. Lowell, May 11 2014

Keywords

Comments

a(n+1)/a(n) is approximately log_2(10) = A020862. - André Engels, Apr 01 2021

Examples

			a(3) = 4 because 1010 has 4 decimal digits.
		

Crossrefs

Programs

  • PARI
    a242347(n) = {my (k=2, d=digits); while(n--, k=fromdigits(d(k,2))); #d(k)} \\ Hugo Pfoertner, Nov 04 2022
  • Python
    A242347_list, l = [1], 2
    for _ in range(10):
        l = int(bin(l)[2:])
        A242347_list.append(len(str(l))) # Chai Wah Wu, Dec 26 2014
    

Formula

a(n) = A055642(A008559(n)). - Michel Marcus, May 11 2014

Extensions

a(1), a(18)-a(20) from Chai Wah Wu, Dec 26 2014

A352040 a(n) is the least number k such that 2^k contains each of the 10 digits at least n times.

Original entry on oeis.org

68, 88, 119, 200, 209, 246, 291, 318, 396, 398, 443, 443, 495, 586, 592, 622, 646, 707, 758, 758, 813, 866, 875, 903, 923, 1001, 1022, 1022, 1105, 1111, 1111, 1231, 1243, 1245, 1327, 1342, 1419, 1453, 1453, 1454, 1534, 1536, 1537, 1626, 1676, 1699, 1699, 1763
Offset: 1

Views

Author

Amiram Eldar, Apr 16 2022

Keywords

Comments

a(1)-a(8) were given in the solution to Problem 410 (Crux Mathematicorum, 1979), but a(2) = 170 is wrong.
a(1) was calculated by Rudolph Ondrejka in 1976.

Examples

			a(1) = 68 since 2^68 = 295147905179352825856 is the least power of 2 that contains all the 10 digits at least once.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local k; for k from a(n-1)
          while min((p-> seq(coeff(p, x, j), j=0..9))(add(
                x^i, i=convert(2^k, base, 10))))Alois P. Heinz, Apr 22 2022
  • Mathematica
    s = Table[Min[DigitCount[2^n, 10, Range[0, 9]]], {n, 1, 2500}]; Table[FirstPosition[s, _?(# >= n &)], {n, 1, Max[s]}] // Flatten
  • Python
    from sympy import ceiling, log
    def A352040(n):
        k = 10*n-1+int(ceiling((10*n-1)*log(5,2)))
        s = str(c := 2**k)
        while any(s.count(d) < n for d in '0123456789'):
            c *= 2
            k += 1
            s = str(c)
        return k   # Chai Wah Wu, Apr 16 2022

Formula

Conjecture: a(n) ~ c*n, where c = 10*log_2(10) = 33.21928... .
a(n) >= (10n-1)*log_2(10), i.e., c = 10*log_2(10) is a lower bound on the asymptotic growth rate. - Chai Wah Wu, Apr 16 2022

A120357 a(n) is the smallest prime p such that 2^p-1 (a Mersenne number) contains 10^n or more decimal digits.

Original entry on oeis.org

2, 31, 331, 3319, 33223, 332191, 3321937, 33219281, 332192831, 3321928097, 33219280951, 332192809589, 3321928094941, 33219280948907, 332192809488739, 3321928094887411, 33219280948873687, 332192809488736253
Offset: 0

Views

Author

G. L. Honaker, Jr., Jun 25 2006

Keywords

Comments

For n>0 almost all digits of a(n) from the left are equal to the first terms of the expansion Log[10]/Log[2] = {3, 3, 2, 1, 9, 2, 8, 0, 9, 4, 8, 8, 7, 3, 6, 2, 3, 4, 7, 8, 7, 0, 3, 1, 9, 4, 2, 9, 4, 8, 9, 3, 9, ...} = A020862(n). - Alexander Adamchuk, Jan 16 2007

Examples

			E.g. a(7)=33219281 because 2^33219281-1 is the smallest Mersenne number that contains 10^7 (ten million) or more decimal digits.
		

Crossrefs

Cf. A001348.
Cf. A020862 = decimal expansion of log(10)/log(2).

Extensions

More terms from Farideh Firoozbakht, Jul 22 2006

A227689 a(n) is the least integer k such that 2^k - 1 has at least 10^n digits.

Original entry on oeis.org

1, 30, 329, 3319, 33216, 332190, 3321925, 33219278, 332192807, 3321928092, 33219280946, 332192809486, 3321928094885, 33219280948871, 332192809488733, 3321928094887360, 33219280948873621, 332192809488736232, 3321928094887362345, 33219280948873623476
Offset: 0

Views

Author

Olivier de Mouzon, Jul 19 2013

Keywords

Examples

			For n = 2, A000225(328) has 99 digits and A000225(329) has 100 digits, so a(2) = 329.
		

Crossrefs

Programs

  • PARI
    a(n) = ceil(log(10^(10^n-1)+1)/log(2)); \\ Michel Marcus, Jun 28 2021

Formula

a(n) = ceiling(log_2(10^(10^n-1)+1)).
Limit_{n -> oo} a(n)/10^n = log_2(10) = A020862. - Alois P. Heinz, Jun 28 2021

Extensions

a(7)-a(19) from Alois P. Heinz, Jun 28 2021
Previous Showing 21-26 of 26 results.