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

A084558 a(0) = 0; for n >= 1: a(n) = largest m such that n >= m!.

Original entry on oeis.org

0, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5
Offset: 0

Views

Author

Antti Karttunen, Jun 23 2003

Keywords

Comments

For n >= 1, a(n) = the number of significant digits in n's factorial base representation (A007623).
After zero, which occurs once, each n occurs A001563(n) times.
Number of iterations (...(f_4(f_3(f_2(n))))...) such that the result is < 1, where f_j(x):=x/j. - Hieronymus Fischer, Apr 30 2012
For n > 0: a(n) = length of row n in table A108731. - Reinhard Zumkeller, Jan 05 2014

Examples

			a(4) = 2 because 2! <= 4 < 3!.
		

References

  • F. Smarandache, "f-Inferior and f-Superior Functions - Generalization of Floor Functions", Arizona State University, Special Collections.

Crossrefs

Programs

  • Haskell
    a084558 n = a090529 (n + 1) - 1  -- Reinhard Zumkeller, Jan 05 2014
    
  • Maple
    0, seq(m$(m*m!),m=1..5); # Robert Israel, Apr 27 2015
  • Mathematica
    Table[m = 1; While[m! <= n, m++]; m - 1, {n, 0, 104}] (* Jayanta Basu, May 24 2013 *)
    Table[Floor[Last[Reduce[x! == n && x > 0, x]]], {n, 120}] (* Eric W. Weisstein, Sep 13 2024 *)
  • PARI
    a(n)={my(m=0);while(n\=m++,);m-1} \\ R. J. Cano, Apr 09 2018
    
  • Python
    def A084558(n):
      i=1
      while n: i+=1; n//=i
      return(i-1)
    print(list(map(A084558,range(101)))) # Natalia L. Skirrow, May 28 2023

Formula

From Hieronymus Fischer, Apr 30 2012: (Start)
a(n!) = a((n-1)!)+1, for n>1.
G.f.: 1/(1-x)*Sum_{k>=1} x^(k!).
The explicit first terms of the g.f. are: (x+x^2+x^6+x^24+x^120+x^720...)/(1-x).
(End)
Other identities:
For all n >= 0, a(n) = A090529(n+1) - 1. - Reinhard Zumkeller, Jan 05 2014
For all n >= 1, a(n) = A060130(n) + A257510(n). - Antti Karttunen, Apr 27 2015
a(n) ~ log(n^2/(2*Pi)) / (2*LambertW(log(n^2/(2*Pi))/(2*exp(1)))) - 1/2. - Vaclav Kotesovec, Aug 22 2025

Extensions

Name clarified by Antti Karttunen, Apr 27 2015

A001069 Log2*(n) (version 2): take log_2 of n this many times to get a number < 2.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 1

Views

Author

Keywords

Comments

From Hieronymus Fischer, Apr 08 2012: (Start)
In terms of A010096 the definition could read: "Number of iterations log_2(log_2(log_2(...(n)...))) such that the result is < 2".
With the only difference in the termination criterion, the definition is essentially the same as A010096. If we change the definition to " ...number < 1" we get A010096. Therefore we get A010096 when adding 1 to each term. (End)

Examples

			a(n)=1, 2, 3, 4, 5, ... for n=2, 2^2, 2^2^2, 2^2^2^2, 2^2^2^2^2, ... =2, 4, 16, 65536, 2^65536, ...
		

Crossrefs

Cf. A010096 (version 1), A230864 (version 3).

Programs

  • Mathematica
    f[n_] := Length@ NestWhileList[ Log[2, #] &, n, # >= 2 &] - 1; Array[f, 105] (* Robert G. Wilson v, Apr 19 2012 *)

Formula

From Hieronymus Fischer, Apr 08 2012: (Start)
a(n) = A010096(n)-1.
With the exponentiation definition E_{i=1..n} c(i) := c(1)^(c(2)^(c(3)^(...(c(n-1)^(c(n)))...))); E_{i=1..0} := 1; example: E_{i=1..4} 2 = 2^(2^(2^2)) = 2^16, we get:
a(E_{i=1..n} 2) = a(E_{i=1..n-1} 2) +1, for n>=1.
G.f.: g(x) = 1/(1-x)*Sum_{k >= 1} x^(E_{i=1..k} 2).
The explicit first terms of this g.f. are
g(x) = (x^2+x^4+x^16+x^65536+...)/(1-x). (End)

A211668 Number of iterations sqrt(sqrt(sqrt(...(n)...))) such that the result is < 3.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3
Offset: 1

Views

Author

Hieronymus Fischer, Apr 30 2012

Keywords

Comments

For the general case of "Number of iterations f(f(f(...(n)...))) such that the result is < q, where f(x) = x^(1/p), p > 1, q > 1", the resulting g.f. is g(x) = 1/(1-x)*Sum_{k>=0} x^(q^(p^k))
= (x^q + x^(q^p) + x^(q^(p^2)) + x^(q^(p^3)) + ...)/(1-x).

Examples

			a(n) = 1, 2, 3, 4, 5 for n = 3^1, 3^2, 3^4, 3^8, 3^16, i.e., n = 3, 9, 81, 6561, 43946721.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Length[NestWhileList[Sqrt, n, # >= 3 &]] - 1; Array[a, 100] (* Amiram Eldar, Dec 08 2018 *)
  • PARI
    a(n) = {my(nbi = 0); if (n < 3, return (nbi)); r = n; nbi= 1; while ((nr = sqrt(r)) >= 3, nbi++; r = nr); return (nbi);} \\ Michel Marcus, Oct 23 2014
    
  • PARI
    A211668(n, c=0)={while(n>=3, n=sqrtint(n); c++); c} \\ M. F. Hasler, Dec 07 2018
    
  • Python
    from sympy import integer_log
    A048766=lambda n: integer_log(n,3)[0].bit_length() # Natalia L. Skirrow, May 17 2023

Formula

a(3^(2^n)) = a(3^(2^(n-1))) + 1, for n >= 1.
G.f.: g(x) = 1/(1-x)*Sum_{k >= 0} x^(3^(2^k))
= (x^3 + x^9 + x^81 + x^6561 + x^43946721 + ...)/(1 - x).

Extensions

Edited by Michel Marcus, Oct 23 2014 and M. F. Hasler, Dec 07 2018

A211666 Number of iterations log_10(log_10(log_10(...(n)...))) such that the result is < 2.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Hieronymus Fischer, Apr 30 2012

Keywords

Comments

Different from A004216, A057427 and A185114.
For a general definition like "Number of iterations log_p(log_p(log_p(...(n)...))) such that the result is < q", where p > 1, q > 0, the resulting g.f. is
g(x) = (1/(1-x))*Sum_{k>=1} x^(E_{i=1..k} b(i,k)), where b(i,k)=p for i

Examples

			a(n) = 0, 1, 2, 3 for n = 1, 2, 10^2, 10^10^2 (= 1, 2, 100, 10^100).
		

Formula

With the exponentiation definition E_{i=1..n} c(i) := c(1)^(c(2)^(c(3)^(...(c(n-1)^(c(n)))...))); E_{i=1..0} c := 1; example: E_{i=1..3} 10 = 10^(10^10) = 10^10000000000, we get:
a(E_{i=1..n} 10) = a(E_{i=1..n-1} 10)+1, for n>=1.
G.f.: g(x) = (1/(1-x))*Sum_{k>=1} x^(E_{i=1..k} b(i,k)), where b(i,k)=10 for i
The explicit first terms of the g.f. are g(x) = (x^2+x^100+x^(10^100)+...)/(1-x).

A211670 Number of iterations (...(f_4(f_3(f_2(n))))...) such that the result is < 2, where f_j(x) := x^(1/j).

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 1

Author

Hieronymus Fischer, Apr 30 2012

Keywords

Comments

Different from A001069, but equal for n < 16.

Examples

			a(n)=1, 2, 3, 4, 5 for n=2^(1!), 2^(2!), 2^(3!), 2^(4!), 2^(5!) (=2, 4, 64, 16777216, 16777216^5).
		

Programs

Formula

a(2^(n!)) = a(2^((n-1)!))+1, for n>1.
G.f.: g(x) = (1/(1-x))*Sum_{k>=1} x^(2^(k!)). The explicit first terms of the g.f. are g(x) = (x^2+x^4+x^64+x^16777216+...)/(1-x).

A211664 Number of iterations (...(log_4(log_3(log_2(n))))...) such that the result is < 1.

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 1

Author

Hieronymus Fischer, Apr 30 2012

Keywords

Examples

			a(n)=1, 2, 3, 4, 5 for n=1, 2, 2^3, 2^3^4, 2^3^4^5 (=1, 2, 8, 2417851639229258349412352, 2^3^1024).
		

Formula

With the exponentiation definition E_{i=1..n} c(i) := c(1)^(c(2)^(c(3)^(...(c(n-1)^(c(n)))...))); E_{i=1..0} := 1; example: E_{i=1..4} 3 = 3^(3^(3^3)) = 3^(3^27), we get:
a(E_{i=1..n} (i+1)) = a(E_{i=1..n-1} (i+1))+1, for n>=1.
G.f.: g(x) = (1/(1-x))*Sum_{k>=0} x^(E_{i=1..k} (i+1)).
The explicit first terms of the g.f. are g(x) = (x+x^2+x^(2^3)+x^(2^3^4)+x^(2^3^4^5)+...)/(1-x) =(x+x^2+x^8+x^2417851639229258349412352+...)/(1-x).

A211662 Number of iterations log_3(log_3(log_3(...(n)...))) such that the result is < 2.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 1

Author

Hieronymus Fischer, Apr 30 2012

Keywords

Examples

			Records a(n)=0, 1, 2, 3, 4, for n=1, 2, 3^2, 3^3^2, 3^3^3^2 (=1, 2, 9, 3^9 = 19683, 3^19683).
		

Formula

With the exponentiation definition E_{i=1..n} c(i) := c(1)^(c(2)^(c(3)^(...(c(n-1)^(c(n)))...))); E_{i=1..0} := 1; example: E_{i=1..4} 3 = 3^(3^(3^3)) = 3^(3^27), we get:
a(E_{i=1..n} 3) = a(E_{i=1..n-1} 3)+1, for n>=1.
G.f.: g(x) = (1/(1-x))*Sum_{k>=1} x^(E_{i=1..k} b(i,k)), where b(i,k)=3 for i

A230864 log2*(n) (version 3): number of iterations log_2(log_2(log_2(...(n)...))) required for the result to be <= 1.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Offset: 1

Author

N. J. A. Sloane, Nov 03 2013

Keywords

Comments

This is the definition of log2* as given by Wikipedia on Nov 03 2013.
If a(n) = k, then n = 2^2^2^...^2^x, where x is in the range 0 < x <= 1 and there are k 2's in the tower. For example a(5)=3 and 5 = 2^2^2^.28134014520...

Crossrefs

Cf. A010096 (version 1), A001069 (version 2).

Formula

a(1)=0; thereafter a(n) = A010096(n-1).

A211661 Number of iterations log_3(log_3(log_3(...(n)...))) such that the result is < 1.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 1

Author

Hieronymus Fischer, Apr 30 2012

Keywords

Comments

For n<16 same as A211663.

Examples

			a(n)=1, 2, 3, 4, 5 for n=1, 3, 3^3, 3^3^3, 3^3^3^3 (=1, 3, 27, 7625597484987, 3^7625597484987).
		

Programs

  • Mathematica
    Table[Length[NestWhileList[Log[3,#]&,n,#>=1&]],{n,90}]-1 (* Harvey P. Dale, Mar 08 2020 *)

Formula

With the exponentiation definition E_{i=1..n} c(i) := c(1)^(c(2)^(c(3)^(...(c(n-1)^(c(n)))...))); E_{i=1..0} := 1; example: E_{i=1..4} 3 = 3^(3^(3^3)) = 3^(3^27), we get:
a(E_{i=1..n} 3) = a(E_{i=1..n-1} 3)+1, for n>=1.
G.f.: g(x) = (1/(1-x))*Sum_{k>=0} x^(E_{i=1..k} 3). The explicit first terms of the g.f. are g(x) = (x+x^3+x^27+x^7625597484987+...)/(1-x).

A211669 Number of iterations f(f(f(...(n)...))) such that the result is < 2, where f(x) = cube root of x.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 1

Author

Hieronymus Fischer, Apr 30 2012

Keywords

Comments

For the general case of "Number of iterations f(f(f(...(n)...))) such that the result is < q, where f(x) = x^(1/p)", with p > 1, q > 1, the resulting g.f. is g(x) = 1/(1 - x)*Sum_{k>=0} x^(q^(p^k))
= (x^q + x^(q^p) + x^(q^(p^2)) + x^(q^(p^3)) + ...)/(1 - x).
The first term that equals 3 is a(512). - Harvey P. Dale, Jan 02 2015

Examples

			a(n) = 1, 2, 3, 4, 5, ... for n = 2^1, 2^3, 2^9, 2^27, 2^81, ..., i.e., n = 2, 8, 512, 134217728, 2417851639229258349412352, ... = A023365.
		

Programs

  • Mathematica
    Table[Length[NestWhileList[Surd[#,3]&,n,#>=2&]],{n,90}]-1 (* Harvey P. Dale, Jan 02 2015 *)
  • PARI
    a(n,c=0)={while(n>=2, n=sqrtnint(n,3); c++);c} \\ M. F. Hasler, Dec 07 2018

Formula

a(2^(3^n)) = a(2^(3^(n-1))) + 1, for n >= 1.
G.f.: 1/(1-x)*Sum_{k>=0} x^(2^(3^k))
= (x^2 + x^8 + x^512 + x^134217728 + ...)/(1 - x).

Extensions

Edited by M. F. Hasler, Dec 07 2018
Showing 1-10 of 14 results. Next