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

A000351 Powers of 5: a(n) = 5^n.

Original entry on oeis.org

1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125, 6103515625, 30517578125, 152587890625, 762939453125, 3814697265625, 19073486328125, 95367431640625, 476837158203125, 2384185791015625, 11920928955078125
Offset: 0

Views

Author

Keywords

Comments

Same as Pisot sequences E(1, 5), L(1, 5), P(1, 5), T(1, 5). Essentially same as Pisot sequences E(5, 25), L(5, 25), P(5, 25), T(5, 25). See A008776 for definitions of Pisot sequences.
a(n) has leading digit 1 if and only if n = A067497 - 1. - Lekraj Beedassy, Jul 09 2002
With interpolated zeros 0, 1, 0, 5, 0, 25, ... (g.f.: x/(1 - 5*x^2)) second inverse binomial transform of Fibonacci(3n)/Fibonacci(3) (A001076). Binomial transform is A085449. - Paul Barry, Mar 14 2004
Sums of rows of the triangles in A013620 and A038220. - Reinhard Zumkeller, May 14 2006
Sum of coefficients of expansion of (1 + x + x^2 + x^3 + x^4)^n. a(n) is number of compositions of natural numbers into n parts less than 5. a(2) = 25 there are 25 compositions of natural numbers into 2 parts less than 5. - Adi Dani, Jun 22 2011
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n >= 1, a(n) equals the number of 5-colored compositions of n such that no adjacent parts have the same color. - Milan Janjic, Nov 17 2011
Numbers n such that sigma(5n) = 5n + sigma(n). In fact we have this theorem: p is a prime if and only if all solutions of the equation sigma(p*x) = p*x + sigma(x) are powers of p. - Jahangeer Kholdi, Nov 23 2013
From Doug Bell, Jun 22 2015: (Start)
Empirical observation: Where n is an odd multiple of 3, let x = (a(n) + 1)/9 and let y be the decimal expansion of x/a(n); then y*(x+1)/x + 1 = y rotated to the left.
Example:
a(3) = 125;
x = (125 + 1)/9 = 14;
y = 112, which is the decimal expansion of 14/125 = 0.112;
112*(14 + 1)/14 + 1 = 121 = 112 rotated to the left.
(End)
a(n) is the number of n-digit integers that contain only odd digits (A014261). - Bernard Schott, Nov 12 2022
Number of pyramids in the Sierpinski fractal square-based pyramid at the n-th step, while A279511 gives the corresponding number of vertices (see IREM link with drawings). - Bernard Schott, Nov 29 2022

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A009969 (even bisection), A013710 (odd bisection), A005054 (first differences), A003463 (partial sums).
Sierpinski fractal square-based pyramid: A020858 (Hausdorff dimension), A279511 (number of vertices), this sequence (number of pyramids).

Programs

Formula

a(n) = 5^n.
a(0) = 1; a(n) = 5*a(n-1) for n > 0.
G.f.: 1/(1 - 5*x).
E.g.f.: exp(5*x).
a(n) = A006495(n)^2 + A006496(n)^2.
a(n) = A159991(n) / A001021(n). - Reinhard Zumkeller, May 02 2009
From Bernard Schott, Nov 12 2022: (Start)
Sum_{n>=0} 1/a(n) = 5/4.
Sum_{n>=0} (-1)^n/a(n) = 5/6. (End)
a(n) = Sum_{k=0..n} C(2*n+1,n-k)*A000045(2*k+1). - Vladimir Kruchinin, Jan 14 2025

A067488 Powers of 2 with initial digit 1.

Original entry on oeis.org

1, 16, 128, 1024, 16384, 131072, 1048576, 16777216, 134217728, 1073741824, 17179869184, 137438953472, 1099511627776, 17592186044416, 140737488355328, 1125899906842624, 18014398509481984, 144115188075855872, 1152921504606846976, 18446744073709551616
Offset: 1

Views

Author

Amarnath Murthy, Feb 09 2002

Keywords

Comments

Also smallest n-digit power of 2.
For each range 10^(n-1) to 10^n-1 there exists exactly 1 power of 2 with first digit 1 (floor(log_10(a(n))) = n-1). As such, the density of this sequence relative to all powers of 2 (A000079) is log(2)/log(10) (0.301..., A007524), which is prototypical of Benford's Law. - Charles L. Hohn, Jul 23 2024

Crossrefs

Programs

Formula

a(n) = 2^ceiling((n-1)*log(10)/log(2)). - Benoit Cloitre, Aug 29 2002
From Charles L. Hohn, Jun 09 2024: (Start)
a(n) = 2^A067497(n-1).
A055642(a(n)) = n. (End)

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

A066343 Beatty sequence for log_2(10).

Original entry on oeis.org

3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59, 63, 66, 69, 73, 76, 79, 83, 86, 89, 93, 96, 99, 102, 106, 109, 112, 116, 119, 122, 126, 129, 132, 136, 139, 142, 146, 149, 152, 156, 159, 162, 166, 169, 172, 176, 179, 182, 186, 189, 192, 195, 199
Offset: 1

Views

Author

Vladeta Jovovic, Dec 15 2001

Keywords

Comments

Number of positive integers <= 10^n that are divisible by no prime exceeding 2.
Maximum number of prime divisors of positive integers <= 10^n counted with multiplicity. - Martin Renner, Apr 04 2014
You wish to represent the rational number n/d in decimal notation, where n is an integer, d is a nonzero integer, and precision(d) represents the number of decimal digits in d. The decimal notation representation of n/d will either terminate or repeat with a repetend. If the decimal notation representation terminates then this sequence defines the maximum number of decimal digits to the right of the decimal point (after truncating trailing zeros) for a given precision of d ... floor(precision(d) * log_2(10)). - Michael T Howard, Jul 17 2017
Beatty complement of A066344. - Jianing Song, Jan 27 2019

Crossrefs

Cf. A020862 (log_2(10)).

Programs

  • Maple
    seq(floor(log[2](10)*n),n=1..60); # Martin Renner, Apr 04 2014
  • Mathematica
    Table[ Floor[ n*Log[2, 10]], {n, 60}] (* Robert G. Wilson v, May 27 2005 *)
  • PARI
    { l=log(10)/log(2); for (n=1, 1000, a=floor(n*l); write("b066343.txt", n, " ", a) ) } \\ Harry J. Smith, Feb 11 2010
    
  • Python
    def A066343(n): return (5**n).bit_length()+n-1 # Chai Wah Wu, Sep 08 2024

Formula

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

A172404 Numbers k such that 3 is the first digit of 2^k.

Original entry on oeis.org

5, 15, 25, 35, 45, 55, 65, 75, 78, 85, 88, 95, 98, 108, 118, 128, 138, 148, 158, 168, 178, 181, 188, 191, 201, 211, 221, 231, 241, 251, 261, 271, 274, 281, 284, 291, 294, 304, 314, 324, 334, 344, 354, 364, 367, 374, 377, 384, 387, 397, 407, 417, 427, 437, 447, 457, 467, 470, 477, 480, 487, 490, 500
Offset: 1

Views

Author

David Radcliffe, Nov 20 2010

Keywords

Comments

The asymptotic density of this sequence is log_10(4/3) = 0.124938... - Amiram Eldar, Jan 27 2021

Crossrefs

Programs

  • GAP
    Filtered([1..500],n->ListOfDigits(2^n)[1]=3); # Muniru A Asiru, Oct 17 2018
    
  • Maple
    x := 1.; L := []; for n from 0 to 500 do if 3 < x and x < 4 then L := [op(L), n] end if; x := 2*x; if x > 10 then x := (1/10)*x end if end do; L;
  • Mathematica
    Select[Range[1000], IntegerDigits[2^#][[1]] == 3 &]
  • PARI
    isok(n) = digits(2^n)[1] == 3; \\ Michel Marcus, Oct 18 2018
  • Python
    ans, x = [], 1.
    for n in range(501):
        if 3 < x < 4: ans.append(n)
        x = x*2
        if x > 10: x = x / 10
    print(ans)
    
  • Python
    from itertools import islice
    def A172404_gen(): # generator of terms
        a, b, c, l = 3, 4, 1, 0
        while True:
            if a<=c:
                if cA172404_list = list(islice(A172404_gen(),30)) # Chai Wah Wu, Nov 13 2023
    

A330243 Numbers k such that the first digit of the decimal expansion of 2^k is 7.

Original entry on oeis.org

46, 56, 66, 76, 86, 96, 149, 159, 169, 179, 189, 242, 252, 262, 272, 282, 292, 345, 355, 365, 375, 385, 438, 448, 458, 468, 478, 488, 531, 541, 551, 561, 571, 581, 634, 644, 654, 664, 674, 727, 737, 747, 757, 767, 777, 830, 840, 850, 860, 870, 923, 933, 943, 953
Offset: 1

Views

Author

Eder Vanzei, Dec 06 2019

Keywords

Comments

The asymptotic density of this sequence is log_10(8/7) = 0.057991... - Amiram Eldar, Jan 27 2021

Examples

			70368744177664 = 2^46.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], Floor[2^# / 10^(Floor[# * Log10[2]])] == 7 &] (* Amiram Eldar, Dec 07 2019 *)
    Select[Range[1000],IntegerDigits[2^#][[1]]==7&] (* or *) Select[Range[ 1000],NumberDigit[2^#,IntegerLength[2^#]-1]==7&] (* Harvey P. Dale, Aug 10 2021 *)
  • Python
    A330243_list = [n for n in range(10**3) if str(2**n)[0] == '7'] # Chai Wah Wu, Dec 12 2019

A363060 Numbers k such that 5 is the first digit of 2^k.

Original entry on oeis.org

9, 19, 29, 39, 49, 59, 69, 102, 112, 122, 132, 142, 152, 162, 172, 195, 205, 215, 225, 235, 245, 255, 265, 298, 308, 318, 328, 338, 348, 358, 391, 401, 411, 421, 431, 441, 451, 461, 494, 504, 514, 524, 534, 544, 554, 587, 597, 607, 617, 627, 637, 647, 657, 680, 690
Offset: 1

Views

Author

Ctibor O. Zizka, May 16 2023

Keywords

Comments

The asymptotic density of this sequence is log_10(6/5) = 0.0791812... . - Amiram Eldar, May 16 2023
In base B we may consider numbers k such that some integer Y >= 1 forms the first digit(s) of X^k. For such numbers k the following inequality holds: log_B(Y) - floor(log_B(Y)) <= k*log_B(X) - floor(k*log_B(X)) < log_B(Y+1) - floor(log_B(Y+1)). The irrationality of log_B(X) is the necessary condition; see the Links section. Examples in the OEIS: B = 10, X = 2; Y = 1 (A067497), Y = 2 (A067469), Y = 3 (A172404).

Examples

			k = 9: the first digit of 2^9 = 512 is 5, thus k = 9 is a term.
		

Crossrefs

Programs

  • Maple
    R:= NULL: count:= 0: t:= 1:
    for k from 1 while count < 100 do
      t:= 2*t;
      if floor(t/10^ilog10(t)) = 5 then R:= R,k; count:= count+1 fi
    od:
    R; # Robert Israel, May 19 2023
  • Mathematica
    Select[Range[700], IntegerDigits[2^#][[1]] == 5 &] (* Amiram Eldar, May 16 2023 *)
  • PARI
    isok(k) = digits(2^k)[1] == 5; \\ Michel Marcus, May 16 2023
    
  • Python
    from itertools import count, islice
    def A363060_gen(startvalue=1): # generator of terms >= startvalue
        m = 1<<(k:=max(startvalue,1))
        for i in count(k):
            if str(m)[0]=='5':
                yield i
            m <<= 1
    A363060_list = list(islice(A363060_gen(),20)) # Chai Wah Wu, May 21 2023

A367296 Numbers k such that 8 is the first digit of 2^k.

Original entry on oeis.org

3, 13, 23, 33, 43, 106, 116, 126, 136, 146, 199, 209, 219, 229, 239, 302, 312, 322, 332, 342, 395, 405, 415, 425, 435, 498, 508, 518, 528, 538, 591, 601, 611, 621, 631, 684, 694, 704, 714, 724, 787, 797, 807, 817, 827, 880, 890, 900, 910, 920, 983, 993, 1003
Offset: 1

Views

Author

Martin Renner, Nov 12 2023

Keywords

Comments

The asymptotic density of this sequence is log_10(9/8) = 0.051152...

Crossrefs

Programs

  • Maple
    x := 1:
    L := []:
    for n from 0 to 10^3 do
      if 8 <= x and x < 9 then
        L := [op(L), n]
      fi;
      x := 2*x;
      if x > 10 then
        x := (1/10)*x fi;
    od:
    L;
    # alternative:
    select(t -> floor(2^t/10^ilog10(2^t))=8, [$1..10^4]); # Robert Israel, Nov 12 2024
  • Mathematica
    Select[Range[1010], IntegerDigits[2^#][[1]] == 8 &] (* Amiram Eldar, Nov 12 2023 *)
  • Python
    from itertools import islice
    def A367296_gen(): # generator of terms
        a, b, c, l = 8, 9, 1, 0
        while True:
            if a<=c:
                if cA367296_list = list(islice(A367296_gen(),30)) # Chai Wah Wu, Nov 13 2023

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

A367294 Numbers k such that 4 is the first digit of 2^k.

Original entry on oeis.org

2, 12, 22, 32, 42, 52, 62, 72, 82, 92, 105, 115, 125, 135, 145, 155, 165, 175, 185, 198, 208, 218, 228, 238, 248, 258, 268, 278, 288, 301, 311, 321, 331, 341, 351, 361, 371, 381, 394, 404, 414, 424, 434, 444, 454, 464, 474, 484, 497, 507, 517, 527, 537, 547
Offset: 1

Views

Author

Martin Renner, Nov 12 2023

Keywords

Comments

The asymptotic density of this sequence is log_10(5/4) = 0.096910...

Crossrefs

Programs

  • Maple
    x := 1:
    L := []:
    for n from 0 to 10^3 do
      if 4 <= x and x < 5 then
        L := [op(L), n]
      fi;
      x := 2*x;
      if x > 10 then
        x := (1/10)*x fi;
    od:
    L;
  • Mathematica
    Select[Range[550], IntegerDigits[2^#][[1]] == 4 &] (* Amiram Eldar, Nov 12 2023 *)
Showing 1-10 of 14 results. Next