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

A003095 a(n) = a(n-1)^2 + 1 for n >= 1, with a(0) = 0.

Original entry on oeis.org

0, 1, 2, 5, 26, 677, 458330, 210066388901, 44127887745906175987802, 1947270476915296449559703445493848930452791205, 3791862310265926082868235028027893277370233152247388584761734150717768254410341175325352026
Offset: 0

Views

Author

Keywords

Comments

Number of binary trees of height less than or equal to n. [Corrected by Orson R. L. Peters, Jan 03 2020]
The rightmost digits cycle (0,1,2,5,6,7,0,1,2,5,6,7,...). - Jonathan Vos Post, Jul 21 2005
Apart from the initial term, a subsequence of A008318. - Reinhard Zumkeller, Jan 17 2008
Partial sums of A001699. - Jonathan Vos Post, Feb 17 2010
Corresponds to the second and second last diagonals of A119687. - John M. Campbell, Jul 25 2011
This is a divisibility sequence. - Michael Somos, Jan 01 2013
Sum_{n>=1} 1/a(n) = 1.739940825174794649210636285335916041018367182486941... . - Vaclav Kotesovec, Jan 30 2015
From Vladimir Vesic, Oct 03 2015: (Start)
Forming Herbrand's domains of formula: (∃x)(∀y)(∀z)(∃k)(P(x)∨Q(y)∧R(k))
where: x->a
k->f(y,z)
we get:
H0 = {a}
H1 = {a, f(a,a)}
H2 = {a, f(a,a), f(a,f(a,a)), f(f(a,a),a), f(f(a,a),f(a,a))}
...
The number of elements in each domain follows this sequence.
(End)
It is an open question whether or not this sequence satisfies Benford's law [Berger-Hill, 2017] - N. J. A. Sloane, Feb 07 2017
This is a strong divisibility sequence; see A329429. - Clark Kimberling, Nov 13 2019
From Peter Bala, Oct 31 2022: (Start)
Let k be a positive integer. Clearly, the sequence obtained by reducing a(n) modulo k is eventually periodic. Conjectures:
1) The sequence obtained by reducing a(n) modulo 2^k is eventually periodic with period 2.
2) The sequence obtained by reducing a(n) modulo 10^k is eventually periodic with period 6 (the case k = 1 is noted above).
3) The sequence obtained by reducing a(n) modulo 20^k is eventually periodic with period 6.
4) For n >= floor(k/2) and for 1 <= i <= 6, the value of a(6*n+i) mod 10^k is a constant independent of n. The digits of these 6 constant integers, when read from right to left, are the first k digits of the 10-adic numbers A318135 (i = 1), A318136 (i = 2), A318137 (i = 3), A318138 (i = 4), A318139 (i = 5) and A318140 (i = 6), respectively. An example is given below.
n a(6*n+1) mod 10^11
1 10066388901
2 72084948901
3 67988948901
4 61588948901
5 01588948901
6 01588948901
7 01588948901
... ...
A318135 begins 1, 0, 9, 8, 4, 9, 8, 8, 5, 1, 0, 2, .... (End)

References

  • Mordechai Ben-Ari, Mathematical Logic for Computer Science, Third edition, 173-203.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 443-448.
  • R. K. Guy, How to factor a number, Proc. 5th Manitoba Conf. Numerical Math., Congress. Num. 16 (1975), 49-89.
  • R. Penrose, The Emperor's New Mind, Oxford, 1989, p. 122.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A137560, which enumerates binary trees of height less than n and exactly j leaf nodes. - Robert Munafo, Nov 03 2009

Programs

Formula

a(n) = B_{n-1}(1) where B_n(x) = 1 + x*B_{n-1}(x)^2 is the generating function of trees of height <= n.
a(n) is asymptotic to c^(2^n) where c=1.2259024435287485386279474959130085213... (see A076949). - Benoit Cloitre, Nov 27 2002
c = b^(1/4) where b is the constant in Bottomley's formula in A004019. a(n) appears very asymptotic to c^(2^n) - Sum_{k>=1} A088674(k)/(2*c^(2^n))^(2*k-1). - Gerald McGarvey, Nov 17 2007
a(n) = Sum_{i=1..n} A001699(i). - Jonathan Vos Post, Feb 17 2010
G.f. = x + 2*x^2 + 5*x^3 + 26*x^4 + 677*x^5 + 458330*x^6 + 210066388901*x^7 + ... . - Michael Somos, Jan 01 2013
a(2n) mod 2 = 0 ; a(2n+1) mod 2 = 1. - Altug Alkan, Oct 04 2015
a(n) + a(n-1) = A213437(n). - Peter Bala, Feb 03 2017
0 = a(n)^2*(+a(n+1) + a(n+2)) + a(n+1)^2*(-a(n+1) - a(n+2) - a(n+3)) + a(n+2)^3 for all n>=0. - Michael Somos, Feb 10 2017
a(n) = A091980(2^(n-1)) for n > 0. - Alois P. Heinz, Jul 11 2019

Extensions

Additional comments from Cyril Banderier, Jun 05 2000
Minor edits by Vaclav Kotesovec, Oct 04 2014
Initial term clarified by Clark Kimberling, Nov 13 2019

A001699 Number of binary trees of height n; or products (ways to insert parentheses) of height n when multiplication is non-commutative and non-associative.

Original entry on oeis.org

1, 1, 3, 21, 651, 457653, 210065930571, 44127887745696109598901, 1947270476915296449559659317606103024276803403, 3791862310265926082868235028027893277370233150300118107846437701158064808916492244872560821
Offset: 0

Views

Author

Keywords

Comments

Approaches 1.5028368...^(2^n), see A077496. Row sums of A065329 as square array. - Henry Bottomley, Oct 29 2001. Also row sum of square array A073345 (AK).

Examples

			G.f. = 1 + x + 3*x^2 + 21*x^3 + 651*x^4 + 457653*x^5 + ... - _Michael Somos_, Jun 02 2019
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 307.
  • I. M. H. Etherington, On non-associative combinations, Proc. Royal Soc. Edinburgh, 59 (Part 2, 1938-39), 153-162.
  • I. M. H. Etherington, Some problems of non-associative combinations (I), Edinburgh Math. Notes, 32 (1940), pp. i-vi. Part II is by A. Erdelyi and I. M. H. Etherington, and is on pages vii-xiv of the same issue.
  • T. K. Moon, Enumerations of binary trees, types of trees and the number of reversible variable length codes, submitted to Discrete Applied Mathematics, 2000.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

Crossrefs

Row sums of A065329.
Column sums of A335919, A335920.

Programs

  • Maple
    s := proc(n) local i,j,ans; ans := [ 1 ]; for i to n do ans := [ op(ans),2*(add(j,j=ans)-ans[ i ])*ans[ i ]+ans[ i ]^2 ] od; RETURN(ans); end; s(10);
  • Mathematica
    a[0] = 1; a[n_] := a[n] = 2*a[n-1]*Sum[a[k], {k, 0, n-2}] + a[n-1]^2; Table[a[n], {n, 0, 9}] (* Jean-François Alcover, May 16 2012 *)
    a[ n_] := If[ n < 2, Boole[n >= 0], With[{u = a[n - 1], v = a[n - 2]}, u (u + v + u/v)]]; (* Michael Somos, Jun 02 2019 *)
  • PARI
    {a(n) = if( n<=1, n>=0, a(n-1) * (a(n-1) + a(n-2) + a(n-1) / a(n-2)))}; /* Michael Somos, 2000 */
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def a(n): return 1 if n <= 1 else a(n-1) * (a(n-1) + a(n-2) + a(n-1)//a(n-2))
    print([a(n) for n in range(10)]) # Michael S. Branicky, Nov 10 2022 after Michael Somos

Formula

a(n+1) = 2*a(n)*(a(0) + ... + a(n-1)) + a(n)^2.
a(n+1) = a(n)^2 + a(n) + a(n)*sqrt(4*a(n)-3), if n > 0.
a(n) = A003095(n+1) - A003095(n) = A003095(n)^2 - A003095(n) + 1. - Henry Bottomley, Apr 26 2001; offset of LHS corrected by Anindya Bhattacharyya, Jun 21 2013
a(n) = A059826(A003095(n-1)).
From Peter Bala, Feb 03 2017: (Start)
a(n) = Product_{k = 1..n} A213437(k).
a(n) + a(n-1) = A213437(n+1) - A213437(n). (End)
a(n) = -a(n-2)^3 + a(n-1)^2 + 3*a(n-1)*a(n-2) + 2*a(n-2)^2 + 2*a(n-1) - 4*a(n-2) (see Narváez link for proof). - Boštjan Gec, Oct 10 2024

Extensions

Minor edits by Vaclav Kotesovec, Oct 04 2014

A213437 Nonlinear recurrence: a(n) = a(n-1) + (a(n-1)+1)*Product_{j=1..n-2} a(j).

Original entry on oeis.org

1, 3, 7, 31, 703, 459007, 210066847231, 44127887746116242376703, 1947270476915296449559747573381594836628779007
Offset: 1

Views

Author

N. J. A. Sloane, Jun 11 2012

Keywords

Comments

This sequence was going to be included in the Aho-Sloane paper, but was omitted from the published version.
It appears that the sequence becomes periodic mod 10^k for any k, with period 3. The last digits are (1,3,7) repeated. Modulo 10^5 the sequence enters the cycle (56703, 79007, 23231) after the first 10 terms. - M. F. Hasler, Jul 23 2012. See also A214635, A214636.

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

Crossrefs

Programs

  • Maple
    A213437 := proc(n)
            if n = 1 then 1;
            else procname(n-1)+(1+procname(n-1))*mul(procname(j),j=1..n-2);
            end if;
    end proc: # R. J. Mathar, Jul 23 2012
  • Mathematica
    RecurrenceTable[{a[n] == a[n-1]+(a[n-1]+1)*(a[n-1]-a[n-2])*a[n-2]/(a[n-2]+1),a[1]==1,a[2]==3},a,{n,1,10}] (* Vaclav Kotesovec, May 06 2015 *)
  • PARI
    a=[1];for(n=1,11,a=concat(a, a[n] + (a[n]+1) * prod(k=1,n-1, a[k] )));a \\ - M. F. Hasler, Jul 23 2012

Formula

a(n) = a(n-1)+(a(n-1)+1)*(a(n-1)-a(n-2))*a(n-2)/(a(n-2)+1). - Johan de Ruiter, Jul 23 2012
a(2+3k) = 9007 (mod 10^4) for all k>0. - M. F. Hasler, Jul 23 2012
a(n) ~ c^(2^n), where c = A076949 = 1.2259024435287485386279474959130085213212293209696612823177009... . - Vaclav Kotesovec, May 06 2015
a(n) = A001699(n)/A001699(n-1); a(n+1) - a(n) = A001699(n) + A001699(n-1); a(n) = A003095(n) + A003095(n-1). - Peter Bala, Feb 03 2017

Extensions

Definition recovered by Johan de Ruiter, Jul 23 2012

A077496 Decimal expansion of lim_{n -> infinity} A001699(n)^(1/2^n).

Original entry on oeis.org

1, 5, 0, 2, 8, 3, 6, 8, 0, 1, 0, 4, 9, 7, 5, 6, 4, 9, 9, 7, 5, 2, 9, 3, 6, 4, 2, 3, 7, 3, 2, 1, 6, 9, 4, 0, 8, 7, 3, 8, 8, 7, 1, 7, 4, 3, 9, 6, 3, 5, 7, 9, 3, 0, 6, 9, 9, 0, 6, 7, 1, 4, 2, 4, 3, 0, 8, 4, 7, 1, 9, 7, 8, 7, 1, 7, 5, 7, 6, 6, 0, 1, 9, 4, 5, 6, 6, 3, 3, 3, 9, 1, 7, 8, 6, 3, 0, 6, 1, 9, 8, 7, 2, 3, 7
Offset: 1

Views

Author

Benoit Cloitre, Dec 01 2002

Keywords

Examples

			1.5028368010497564997529364237321694087388717439635793069906714243...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, Section 6.10 Quadratic recurrence constants, p. 443.

Crossrefs

Programs

  • Magma
    function A003095(n)
      if n eq 0 then return 0;
      else return 1 + A003095(n-1)^2;
      end if; return A003095;
    end function;
    function S(n)
      if n eq 1 then return Log(2)/2;
      else return S(n-1) + Log(1 + 1/A003095(n)^2)/2^n;
      end if; return S;
    end function;
    SetDefaultRealField(RealField(120)); Exp(S(12)); // G. C. Greubel, Nov 29 2022
    
  • Mathematica
    digits = 105; Clear[b, beta]; b[0] = 1; b[n_] := b[n] = b[n-1]^2 + 1; b[10]; beta[n_] := beta[n] = b[n]^(2^(-n)); beta[5]; beta[n = 6]; While[ RealDigits[beta[n], 10, digits+5] != RealDigits[beta[n-1], 10, digits+5], Print["n = ", n]; n = n+1]; RealDigits[beta[n], 10, digits] // First (* Jean-François Alcover, Jun 18 2014 *)
    (* Second program *)
    A003095[n_]:= A003095[n]= If[n==0, 0, 1 + A003095[n-1]^2];
    S[n_]:= S[n]= If[n==1, Log[2]/2, S[n-1] + Log[1 + 1/A003095[n]^2]/2^n];
    RealDigits[Exp[S[13]], 10, 120][[1]] (* G. C. Greubel, Nov 29 2022 *)
  • SageMath
    @CachedFunction
    def A003095(n): return 0 if (n==0) else 1 + A003095(n-1)^2
    @CachedFunction
    def S(n): return log(2)/2 if (n==1) else S(n-1) + log(1 + 1/(A003095(n))^2)/2^n
    numerical_approx( exp(S(12)), digits=120) # G. C. Greubel, Nov 29 2022

Formula

Equals A076949^2. - Vaclav Kotesovec, Dec 17 2014
Equals exp(Sum_{k>=1} log(1+1/A003095(k)^2)/2^k) (Aho and Sloane, 1973). - Amiram Eldar, Feb 02 2022

A258113 Decimal expansion of a constant related to A007660.

Original entry on oeis.org

1, 1, 1, 3, 0, 5, 7, 9, 7, 5, 9, 0, 2, 9, 3, 1, 9, 3, 2, 8, 5, 3, 5, 9, 7, 7, 0, 7, 1, 6, 7, 5, 8, 4, 9, 1, 9, 0, 6, 6, 0, 0, 1, 8, 1, 5, 1, 0, 1, 8, 6, 5, 2, 7, 2, 0, 1, 4, 3, 7, 9, 7, 2, 4, 2, 0, 6, 9, 2, 7, 7, 1, 7, 2, 9, 7, 9, 8, 8, 2, 5, 9, 3, 8, 1, 6, 0, 9, 3, 6, 1, 4, 5, 4, 4, 5, 9, 4, 3, 5, 2, 2, 3, 4, 5
Offset: 1

Views

Author

Vaclav Kotesovec, May 20 2015

Keywords

Examples

			1.1130579759029319328535977071675849190660018151018652720143797242069...
		

Crossrefs

Programs

  • Mathematica
    A007660 = RecurrenceTable[{a[1]==0, a[2]==N[1,200], a[n]==a[n-1]*a[n-2]+1},a[n],{n,1,30}]; Do[Print[N[Exp[c2]/.Solve[Table[Log[A007660[[n]]]==c1*((1-Sqrt[5])/2)^n + c2*((1+Sqrt[5])/2)^n, {n,k,k+1}]], 120][[1]]],{k, Length[A007660]-2, Length[A007660]-1}];

Formula

Equals limit n->infinity (A007660(n))^((2/(1+sqrt(5)))^n).

A258112 Decimal expansion of a constant related to A001056.

Original entry on oeis.org

1, 7, 9, 7, 8, 7, 8, 4, 9, 0, 0, 0, 9, 1, 6, 0, 4, 8, 1, 3, 5, 5, 9, 5, 0, 8, 8, 3, 7, 0, 3, 1, 3, 5, 2, 1, 6, 1, 7, 9, 3, 6, 6, 5, 2, 6, 5, 0, 1, 9, 5, 2, 5, 3, 6, 8, 5, 5, 2, 3, 6, 2, 5, 4, 2, 7, 4, 5, 5, 8, 4, 1, 3, 2, 4, 6, 3, 6, 0, 7, 4, 1, 7, 3, 9, 2, 7, 8, 8, 0, 5, 6, 9, 3, 2, 4, 0, 9, 5, 6, 6, 8, 5, 9, 9
Offset: 1

Views

Author

Vaclav Kotesovec, May 20 2015

Keywords

Examples

			1.7978784900091604813559508837031352161793665265019525368552362542745...
		

Crossrefs

Programs

  • Mathematica
    A001056 = RecurrenceTable[{a[0]==1, a[1]==N[3, 200], a[n] == a[n-1]*a[n-2]+1}, a[n], {n, 1, 30}]; Do[Print[N[Exp[c2]/.Solve[Table[Log[A001056[[n]]] == c1*((1-Sqrt[5])/2)^n + c2*((1+Sqrt[5])/2)^n, {n, k, k+1}]], 120][[1]]], {k, Length[A001056]-2, Length[A001056]-1}];

Formula

Equals limit n->infinity (A001056(n))^((2/(1+sqrt(5)))^n).

A101191 G.f.: A(x) = Sum_{n>=0}a(n)/2^A004134(n)*x^n = limit_{n->oo} F(n)^(1/2^(n+1)) where F(n) is the n-th iteration of: F(0) = 1, F(n) = F(n-1)^2 + x^(2^n-1) for n>=1.

Original entry on oeis.org

1, 1, -3, 23, -525, 2695, -29687, 191991, -10488701, 70977675, -968279181, 6752850945, -191225421641, 1363019302883, -19538003443615, 140961586090743, -16379289413266717, 119621607825995891, -1755802638936696081, 12944528671963135869, -383361262914445548739
Offset: 0

Views

Author

Paul D. Hanna, Dec 03 2004

Keywords

Comments

Although the power series for the g.f. A(x) diverges at x=1, the Euler transform of the power series A(x) at x=1 converges to the constant A076949: Sum_{n>=0}[Sum_{k=0..n}C(n,k)*a(k))/2^A004134(n) ]/2^(n+1) = 1.2259024435...

Examples

			The iteration begins:
F(0) = 1,
F(1) = F(0)^2 + x^(2^1-1) = 1 +x,
F(2) = F(1)^2 + x^(2^2-1) = 1 +2*x +x^2 +x^3,
F(3) = F(2)^2 + x^(2^3-1) = 1 +4*x +6*x^2 +6*x^3 +5*x^4 +2*x^5 +x^6 +x^7.
The 2^(n+1)-th roots of F(n) tend to the limit of the g.f.:
F(1)^(1/2^2) = 1 +1/4*x -3/32*x^2 +7/128*x^3 -77/2048*x^4 +231/8192*x^5 +...
F(2)^(1/2^3) = 1 +1/4*x -3/32*x^2 +23/128*x^3 -525/2048*x^4 +2695/8192*x^5 +...
F(3)^(1/2^4) = 1 +1/4*x -3/32*x^2 +23/128*x^3 -525/2048*x^4 +2695/8192*x^5 +...
The limit of this process is the g.f. A(x) of this sequence.
The coefficients of x^k in the 2^n powers of the g.f. A(x) begin:
A^(2^0)=[1,1/4,-3/32,23/128,-525/2048,2695/8192,-29687/65536,...],
A^(2^1)=[1,1/2,-1/8,5/16,-53/128,127/256,-677/1024,2221/2048,...],
A^(2^2)=[1,1,0,1/2,-1/2,1/2,-5/8,9/8,-2,53/16,-89/16,155/16,...],
A^(2^3)=[1,2,1,1,0,0,0,1/2,-1,3/2,-5/2,9/2,-8,14,-197/8,44,...],
A^(2^4)=[1,4,6,6,5,2,1,1,0,0,0,0,0,0,0,1/2,-2,5,...],
A^(2^5)=[1,8,28,60,94,116,114,94,69,44,26,14,5,2,1,1,0,0,...].
Note: the sum of the coefficients of x^k in F(n) equals A003095(n+1):
1, 2=1+1, 5=1+2+1+1, 26=1+4+6+6+5+2+1+1, ...
The last n coefficients in F(n) read backwards are Catalan numbers (A000108).
		

Crossrefs

Programs

  • PARI
    {a(n)=local(F=1,A,L);if(n==0,A=1,L=ceil(log(n+1)/log(2)); for(k=1,L,F=F^2+x^(2^k-1)); A=polcoeff(F^(1/2^(L+1))+x*O(x^n),n));numerator(A)}

Formula

G.f. A(x) satisfies: A(x)^2 = Sum_{n>=0} A101190(n)/2^A005187(n)*x^n. G.f. A(x) satisfies: A(2*x)^4 = Sum_{n>=0} A101189(n)*(2x)^n.

A125046 Partial sums of A003095.

Original entry on oeis.org

0, 1, 3, 8, 34, 711, 459041, 210066847942, 44127887746116242835744, 1947270476915296449559747573381595046695626949, 3791862310265926082868235028027893277370233154194659061677030600277515827791936222020978975
Offset: 0

Views

Author

Jonathan Vos Post, Jan 08 2007

Keywords

Crossrefs

Programs

Formula

a(n) = a(n-1)^2 - 2a(n-1)a(n-2)+a(n-2)^2 + a(n-1) + 1 for n > 1. [Charles R Greathouse IV, Dec 29 2011]
a(n) ~ c^(2^n), where c = A076949 = 1.225902443528748538627947495913... . - Vaclav Kotesovec, Dec 18 2014
Showing 1-8 of 8 results.