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

A067497 Smallest k for which 2^k is n+1 decimal digits long, and equivalently numbers k such that 1 is the first digit of 2^k.

Original entry on oeis.org

0, 4, 7, 10, 14, 17, 20, 24, 27, 30, 34, 37, 40, 44, 47, 50, 54, 57, 60, 64, 67, 70, 74, 77, 80, 84, 87, 90, 94, 97, 100, 103, 107, 110, 113, 117, 120, 123, 127, 130, 133, 137, 140, 143, 147, 150, 153, 157, 160, 163, 167, 170, 173, 177, 180, 183, 187, 190, 193, 196
Offset: 0

Views

Author

Benoit Cloitre, Feb 22 2002

Keywords

Comments

The asymptotic density of this sequence is log_10(2) = 0.301029... (A007524). - Amiram Eldar, Jan 27 2021

Crossrefs

Programs

  • GAP
    Filtered([0..200],n->ListOfDigits(2^n)[1]=1); # Muniru A Asiru, Oct 22 2018
    
  • Mathematica
    a[n_] := Block[{k = 0}, While[ Floor[Log[10, 2^k] + 1] < n, k++ ]; k]; Table[ a[n], {n, 1, 61}]
    Table[Ceiling[n*Log[2, 10]], {n, 0, 59}] (* Jean-François Alcover, Jan 29 2014, after Vladeta Jovovic *)
  • PARI
    for(n=0,500, if(floor(2^n/10^(floor(n*log(2)/log(10))))==1,print1(n,", ")))
    
  • PARI
    a(n) = ceil(n*log(10)/log(2)); \\ Michel Marcus, May 13 2017
    
  • Python
    def A067497(n): return (10**n-1).bit_length() # Chai Wah Wu, Apr 02 2023
    
  • Sage
    [ceil(n*log(10)/log(2)) for n in range(0, 60)] # Stefano Spezia, Aug 31 2024

Formula

a(n) = ceiling(n*log_2(10)). - Vladeta Jovovic, Jun 20 2002
a(n) = log_2(A067488(n+1)). - Charles L. Hohn, Jun 09 2024

Extensions

Additional comments from Lekraj Beedassy, Jun 20 2002 and from Rick Shephard, Jun 27 2002

A123384 Number of bits in binary expansion of 10^n.

Original entry on oeis.org

1, 4, 7, 10, 14, 17, 20, 24, 27, 30, 34, 37, 40, 44, 47, 50, 54, 57, 60, 64, 67, 70, 74, 77, 80, 84, 87, 90, 94, 97, 100, 103, 107, 110, 113, 117, 120, 123, 127, 130, 133, 137, 140, 143, 147, 150, 153, 157, 160, 163, 167, 170, 173, 177, 180, 183, 187, 190, 193, 196
Offset: 0

Views

Author

Andrew Caldwell (spongebobpj(AT)yahoo.com), Nov 09 2006

Keywords

Comments

Number of powers of 2 less than or equal to 10^n. - Peter Munn, Nov 13 2019

Examples

			a(3)=10 because 10^3 = 1111101000_2.
10^1 = 10 = 1010_2 has 4 digits.
		

Crossrefs

Programs

  • Maple
    A007524 := log[10](2.0) ; for n from 0 to 40 do printf("%d,", 1+floor(n/A007524)) ; od: # R. J. Mathar, Nov 12 2006
    a:=n->nops(convert(10^n,base,2)): seq(a(n),n=0..70); # Emeric Deutsch, Mar 26 2007
  • Mathematica
    a[n_]:=1 + Floor[n/Log10[2]]; Array[a,60,0] (* Stefano Spezia, Aug 31 2024 *)

Formula

a(n) = 1 + floor(n/A007524) = 1 + floor(n/log_10(2)). - R. J. Mathar, Nov 12 2006
a(n) = 1 + A066343(n). - R. J. Mathar, Mar 02 2007
a(n) = A067497(n) for n >= 1. - Georg Fischer, Nov 02 2018

Extensions

More terms from Emeric Deutsch, Mar 26 2007

A253635 Rectangular array read by upwards antidiagonals: a(n,k) = index of largest term <= 10^k in row n of A253572, n >= 1, k >= 0.

Original entry on oeis.org

1, 1, 4, 1, 7, 7, 1, 9, 20, 10, 1, 10, 34, 40, 14, 1, 10, 46, 86, 67, 17, 1, 10, 55, 141, 175, 101, 20, 1, 10, 62, 192, 338, 313, 142, 24, 1, 10, 67, 242, 522, 694, 507, 190, 27, 1, 10, 72, 287, 733, 1197, 1273, 768, 244, 30
Offset: 1

Views

Author

L. Edson Jeffery, Jan 07 2015

Keywords

Comments

Or a(n,k) = the number of positive integers less than or equal to 10^k that are divisible by no prime exceeding prime(n).

Examples

			Array begins:
{1,  4,  7,  10,   14,   17,    20,    24,    27,     30, ...}
{1,  7, 20,  40,   67,  101,   142,   190,   244,    306, ...}
{1,  9, 34,  86,  175,  313,   507,   768,  1105,   1530, ...}
{1, 10, 46, 141,  338,  694,  1273,  2155,  3427,   5194, ...}
{1, 10, 55, 192,  522, 1197,  2432,  4520,  7838,  12867, ...}
{1, 10, 62, 242,  733, 1848,  4106,  8289, 15519,  27365, ...}
{1, 10, 67, 287,  945, 2579,  6179, 13389, 26809,  50351, ...}
{1, 10, 72, 331, 1169, 3419,  8751, 20198, 42950,  85411, ...}
{1, 10, 76, 369, 1385, 4298, 11654, 28434, 63768, 133440, ...}
{1, 10, 79, 402, 1581, 5158, 14697, 37627, 88415, 193571, ...}
		

Crossrefs

Programs

  • Mathematica
    r = 10; y[1] = t = Table[2^j, {j, 0, 39}]; max = 10^13; len = 10^10; prev = 0; For[n = 2, n <= r, n++, next = 0; For[k = 1, k <= 43, k++, If[Prime[n]^k < max, t = Union[t, Prime[n]*t]; s = FirstPosition[t, v_ /; v > len, 0]; t = Take[t, s[[1]] - 1]; If[t[[-1]] > len, t = Delete[t, -1]]; next = Length[t]; If[next == prev, Break, prev = next], Break]]; y[n] = t]; b[i_, j_] := FirstPosition[y[i], v_ /; v > 10^j][[1]]; a253635[n_, j_] := If[IntegerQ[b[n, j]], b[n, j] - 1, 0]; Flatten[Table[a253635[n - j, j], {n, r}, {j, 0, n - 1}]] (* array antidiagonals flattened *)

A074116 Largest n-digit power of 2.

Original entry on oeis.org

8, 64, 512, 8192, 65536, 524288, 8388608, 67108864, 536870912, 8589934592, 68719476736, 549755813888, 8796093022208, 70368744177664, 562949953421312, 9007199254740992, 72057594037927936, 576460752303423488, 9223372036854775808, 73786976294838206464, 590295810358705651712
Offset: 1

Views

Author

Amarnath Murthy, Aug 27 2002

Keywords

Comments

The exponents are given in A066343. - Evgeny Kapun, Jan 16 2017
An equivalent definition (which was formerly the definition of A074113): "Smallest n-digit number of the form p^a*q^b... with the maximum value of a+b+.... where p, q etc. are primes. If a,b,c,... are the indices in the signature prime factorization then a+b+c ... is a maximum." That this is the same sequence follows from the inequality p^a*q^b... >= 2^(a+b+...) and the fact that there always exists a power of 2 between two consecutive powers of 10.

Crossrefs

Programs

  • Mathematica
    Last[#]&/@(With[{l2=2^Range[80]},Table[Select[l2,IntegerLength[#] == n&], {n,22}]]) (* Harvey P. Dale, Jul 17 2011 *)

Formula

a(n) = 2^A066343(n).

Extensions

Edited by R. J. Mathar, Feb 13 2008, Max Alekseyev, Mar 10 2009, Harvey P. Dale, Jul 17 2011, Evgeny Kapun, Jan 16 2017, and N. J. A. Sloane, Jan 18 2017

A100752 a(n) is the number of positive integers <= 10^n that are divisible by no prime exceeding 3.

Original entry on oeis.org

1, 7, 20, 40, 67, 101, 142, 190, 244, 306, 376, 452, 534, 624, 720, 824, 935, 1052, 1178, 1309, 1447, 1593, 1745, 1905, 2071, 2244, 2424, 2611, 2806, 3006, 3214, 3429, 3652, 3881, 4117, 4360, 4610, 4866, 5131, 5401, 5679, 5964, 6255, 6553, 6859, 7172, 7491
Offset: 0

Views

Author

Robert G. Wilson v, May 27 2005

Keywords

Comments

A good approximation seems to be ceiling(log(10^n)*log(6*10^n)/(log(3)*log(4))). - Horst H. Manninger, Oct 29 2022

Examples

			a(1) = 7 as there are 7 3-smooth numbers less than 10^1 = 10; they are 1, 2, 3, 4, 6, 8, 9. - _David A. Corneth_, Nov 14 2019
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Sum[ Floor@ Log[2, n/3^i] + 1, {i, 0, Log[3, n]}]; Table[ f[10^n], {n, 0, 46}] (* Robert G. Wilson v, Nov 07 2012 *)
  • Python
    from sympy import integer_log
    def A100752(n): return sum((10**n//3**i).bit_length() for i in range(integer_log(10**n,3)[0]+1)) # Chai Wah Wu, Oct 23 2024

Formula

a(n) = A071521(10^n). - Chai Wah Wu, Oct 23 2024

A066344 Beatty sequence for log_5(10).

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 10, 11, 12, 14, 15, 17, 18, 20, 21, 22, 24, 25, 27, 28, 30, 31, 32, 34, 35, 37, 38, 40, 41, 42, 44, 45, 47, 48, 50, 51, 52, 54, 55, 57, 58, 60, 61, 62, 64, 65, 67, 68, 70, 71, 72, 74, 75, 77, 78, 80, 81, 82, 84, 85, 87, 88, 90, 91, 92, 94, 95, 97, 98, 100
Offset: 1

Views

Author

Vladeta Jovovic, Dec 15 2001

Keywords

Comments

Beatty complement of A066343. - Jianing Song, Jan 27 2019

Crossrefs

Cf. A066343, A154156 (log_5(10)).

Programs

  • Mathematica
    Floor[Range[100]*Log[5, 10]] (* Paolo Xausa, Jul 08 2024 *)
  • PARI
    { l=log(10)/log(5); for (n=1, 1000, a=floor(n*l); write("b066344.txt", n, " ", a) ) } \\ Harry J. Smith, Feb 11 2010
    
  • Python
    from sympy import integer_log
    def A066344(n): return integer_log(1<Chai Wah Wu, Sep 08 2024

Formula

a(n) = floor(n*log_5(10)).

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

A054965 Beatty sequence for log_3(10), i.e., for 1/log_10(3); so largest exponent of 3 which produces an n-digit decimal number.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 132, 134, 136
Offset: 1

Views

Author

Henry Bottomley, Dec 13 2002

Keywords

Examples

			log_10(3) = 0.477121... so a(11) = floor(11/0.477121...) = floor(23.0549...) = 23; 3^23 = 94143178827 is the largest 11 decimal digit power of 3.
		

Crossrefs

Programs

  • Mathematica
    Floor[Range[100]*Log[3, 10]] (* Paolo Xausa, Jul 11 2024 *)
  • PARI
    a(n) = n*log(10)\log(3); \\ Michel Marcus, Aug 03 2017

Formula

a(n) = floor(n/log_10(3)) = log_3(A074118(n)) = A062153(A074118(n)).

A273158 Number of concatenations nm consisting of n followed by a positive integer m (not a multiple of 10) that are divisible by m.

Original entry on oeis.org

5, 6, 12, 8, 8, 14, 14, 9, 21, 9, 14, 17, 16, 17, 19, 11, 16, 25, 16, 11, 32, 17, 16, 20, 11, 18, 33, 20, 17, 21, 17, 12, 33, 18, 20, 29, 17, 18, 35, 12, 17, 37, 17, 20, 31, 18, 17, 23, 26, 12
Offset: 1

Views

Author

Reiner Moewald, May 16 2016

Keywords

Examples

			a(1)=5 since 1|11, 2|12, 5|15, 25|125, 125|1125.
		

Crossrefs

Cf. A066343.

Programs

  • Python
    # for N < 100
    import math
    for N in range (1, 100):
       ANZ = 0
       for M in range(1, 195312500):
          Z = int(str(int(N)) + str(int(M)))
          if ((Z % M == 0) and (M % 10 > 0)):
             ANZ = ANZ + 1
       print(N, ANZ)

Formula

m <= n * 5^a(2 + floor(log_10(n))) with a(n) from A066343.
Showing 1-9 of 9 results.