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.

A023532 a(n) = 0 if n is of the form m*(m+3)/2, otherwise 1.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

From Stark: "alpha = 0.101101110111101111101111110 ... is irrational. For if alpha were rational, its decimal expansion would be periodic and have a period of length r starting with the k-th digit of the expansion.
"But by the very nature of alpha, there will be blocks of r digits, all 1, in this expansion after the k-th digit and the periodicity would then guarantee that everything after such a block of r digits would also be all ones.
"This contradicts the fact that there will always be zeros occurring after any given point in the expansion of alpha. Hence alpha is irrational."
a(A000096(n)) = 0; a(A007401(n)) = 1. - Reinhard Zumkeller, Dec 04 2012
Sequence B is called a reverse reluctant sequence of sequence A, if B is triangle array read by rows: row number k lists first k elements of the sequence A in reverse order. A023532 is reverse reluctant sequence of sequence A211666. - Boris Putievskiy, Jan 11 2013
An example of a sequence with infinite critical exponent [Vaslet]. - N. J. A. Sloane, May 05 2013

Examples

			From _Boris Putievskiy_, Jan 11 2013: (Start)
As a triangular array written by rows, the sequence begins:
  0;
  1, 0;
  1, 1, 0;
  1, 1, 1, 0;
  1, 1, 1, 1, 0;
  1, 1, 1, 1, 1, 0;
  1, 1, 1, 1, 1, 1, 0;
  ...
(End)
		

References

  • Harold M. Stark, An Introduction to Number Theory, The MIT Press, Cambridge, Mass, eighth printing 1994, page 170.

Crossrefs

Essentially the same sequence as A114607 and A123110. - N. J. A. Sloane, Feb 07 2020

Programs

  • Haskell
    a023532 = (1 -) . a010052 . (+ 9) . (* 8)
    a023532_list = concat $ iterate (\rs -> 1 : rs) [0]
    -- Reinhard Zumkeller, Dec 04 2012
    
  • Maple
    A023532 := proc(n)
        option remember ;
        local m,t ;
        for m from 0 do
            t := m*(m+3)/2 ;
            if t > n then
                return 1 ;
            elif t = n then
                return 0 ;
            end if;
        end do:
    end proc:
    seq(A023532(n),n=0..40) ; # R. J. Mathar, May 15 2025
  • Mathematica
    a = {}; Do[a = Append[a, Join[ {0}, Table[1, {n} ] ] ], {n, 1, 13} ]; a = Flatten[a]
    Table[PadLeft[{0},n,1],{n,0,20}]//Flatten (* Harvey P. Dale, Jul 10 2019 *)
  • PARI
    for(n=1,9,print1("0, ");for(i=1,n,print1("1, "))) \\ Charles R Greathouse IV, Jun 16 2011
    
  • PARI
    a(n)=!issquare(8*n+9) \\ Charles R Greathouse IV, Jun 16 2011
    
  • Python
    from sympy.ntheory.primetest import is_square
    def A023532(n): return bool(is_square((n<<3)+9))^1 # Chai Wah Wu, Feb 10 2023

Formula

a(n) = 0 if and only if 8n+9 is a square. - Charles R Greathouse IV, Jun 16 2011
Blocks of lengths 1, 2, 3, 4, ... of ones separated by a single zero.
a(n) = 1 - floor((sqrt(9+8n)-1)/2) + floor((sqrt(1+8n)-1)/2). - Paul Barry, May 25 2004
a(n) = A211666(m), where m = (t^2 + 3*t + 4)/2n - n, t = floor((-1 + sqrt(8*n-7))/2). - Boris Putievskiy, Jan 11 2013
a(n) = [A002262(n) < A003056(n)]. - Yuchun Ji, May 18 2020
a(n) = 1-A023531(n). - R. J. Mathar, May 15 2025

Extensions

Additional comments from Robert G. Wilson v, Nov 06 2000

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

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

Views

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).
		

Crossrefs

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

Views

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).
		

Crossrefs

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

Views

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).
		

Crossrefs

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

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

A211663 Number of iterations log(log(log(...(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, 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

Comments

Same as A211661 for n < 16.

Examples

			a(n)=1, 2, 3, 4, for n=1, ceiling(e), ceiling(e^e), ceiling(e^e^e), = 1, 3, 16, 3814280, respectively.
		

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(ceiling(E_{i=1..n} e)) = a(ceiling(E_{i=1..n-1} e))+1, for n>=1.
G.f.: g(x) = (1/(1-x))*Sum_{k>=0} x^(ceiling(E_{i=1..k} e)). The explicit first terms of the g.f. are g(x) = (x + x^3 + x^16 + x^3814280 + ...)/(1-x).

A211665 Minimal number of iterations of log_10 applied to n until the result is < 1.

Original entry on oeis.org

1, 1, 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, 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

Different from A055642 and A138902, cf. Example.
Instead the real-valued log function one can consider only the integer part (i.e., A004216), since log_b(x) < k <=> x < b^k <=> floor(x) < b^k for any integer k >= 0; that's also why the first 2, 3, 4, ... appears exactly for 10, 10^10, 10^(10^10) etc. - M. F. Hasler, Dec 12 2018

Examples

			a(n) = 1, 2, 3, 4 for n = 1, 10, 10^10, 10^(10^10), i.e., n = 1, 10, 10000000000, 10^10000000000.
a(n) = 2 for all n >= 10, n < 10^10.
		

Programs

  • Mathematica
    a[n_] := Length[NestWhileList[Log10, n, # >= 1 &]] - 1; Array[a, 100] (* Amiram Eldar, Dec 08 2018 *)
  • PARI
    a(n,i=1)={while(n=logint(n,10),i++);i} \\ M. F. Hasler, Dec 07 2018

Formula

With 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..3} 10 = 10^(10^10) = 10^10000000000, we have:
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>=0} x^(E_{i=1..k} 10) = (x + x^10 + x^(10^10) + ...)/(1-x).

Extensions

Name reworded by M. F. Hasler, Dec 12 2018
Showing 1-9 of 9 results.