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

A002065 a(n+1) = a(n)^2 + a(n) + 1.

Original entry on oeis.org

0, 1, 3, 13, 183, 33673, 1133904603, 1285739649838492213, 1653126447166808570252515315100129583, 2732827050322355127169206170438813672515557678636778921646668538491883473
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of trees of height <= n, generated by unary and binary composition: S = x + (S) + (S,S) = x + (x) + (x,x) + (x,(x)) + ((x),x) + ((x)) + ((x),(x)) + (x,(x,x)) + ((x,x),x) + ((x),(x,x)) + ((x,x),(x)) + ((x,x)) + ((x,x),(x,x)) + ... (x is of height 1); the first difference sequence (beginning with 1), 1 2 10 170 33490 1133870930..., gives the number h(n) of these trees whose height is n, h(n + 1) = h(n) + h(n)*h(n) + 2h(n)*a(n-1), h(1) = 1; as h(n + 1)/h(n) = 1 + a(n) + a(n-1) gives sequence 1, 2, 10 (2*5), 170 (2*5*17), 33490 (2*5*17*197), 1133870930 (2*5*17*197*33877), ... - Claude Lenormand (claude.lenormand(AT)free.fr), Sep 05 2001
This is a divisibility sequence, that is, if n divides m, then a(n) divides a(m). This is a particular case of the result: if p(x) is an integral polynomial then the sequence of n-th iterates p^n(x) (:= p(p^(n-1)(x)) with p^1(x) := p(x)), n = 1,2,..., of p(x) evaluated at x = 0 is a divisibility sequence. In this case p(x) = 1 + x + x^2. - Peter Bala, Mar 28 2018

References

  • Mordechai Ben-Ari, Mathematical Logic for Computer Science, Third edition, 173-203.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 433-434.
  • 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

Programs

  • Magma
    [n le 1 select 0 else Self(n-1)^2 + Self(n-1) + 1: n in [1..15]]; // Vincenzo Librandi, Oct 05 2015
    
  • Mathematica
    f[x_] := 1 + x + x^2 ; NestList[f, 1, 7] (* Geoffrey Critzer, May 04 2010 *)
  • Maxima
    a(n) := if n = 0 then 1 else a(n-1)^2+a(n-1)+1 $
    makelist(a(n),n,0,8); /* Emanuele Munarini, Mar 23 2017 */
  • PARI
    a(n)=if(n<1,0,a(n-1)^2+a(n-1)+1)
    

Formula

a(n) = floor(c^(2^n)) for n > 0, where c = 1.385089248334672909882206535871311526236739234374149506334120193387331772... - Benoit Cloitre, Nov 29 2002
a(n) = (A232806(n) - 1)/2 = (A232806(n-1)^2 + 3)/4. - Peter Bala, Mar 28 2018

A166105 Quadratic recurrence from Sylvester's sequence, but starting with a(0)=1 and a(1)=2.

Original entry on oeis.org

1, 2, 4, 14, 184, 33674, 1133904604, 1285739649838492214, 1653126447166808570252515315100129584, 2732827050322355127169206170438813672515557678636778921646668538491883474
Offset: 0

Views

Author

Jaume Oliver Lafont, Oct 06 2009

Keywords

Comments

a(n) is the size of the set S(n) constructed recursively as follows: Let S(1) = {a,b} and let P(S) be the set of pairs (s,t) where s,t are members of S and s not equal to t. We define S(n+1) as the union of S(n) and P(S(n)). - David M. Cerna, Feb 07 2018

Crossrefs

Cf. A000058.

Programs

  • GAP
    a:= [1, 2];; for n in [3..13] do a[n]:= a[n-1]^2 - a[n-2]^2 + a[n-2]; od; a; # Muniru A Asiru, Feb 07 2018
  • Maple
    a := proc(n) option remember: if n=0 then 1 elif n=1 then 2 elif n>=2 then procname(n-1)^2 - procname(n-2)^2 + procname(n-2) fi; end:
    seq(a(n), n = 0..10); # Muniru A Asiru, Feb 07 2018
    a:=1:A:=a : to 10 do a:=a*(a-1)+2 : A:=A,a od:
    print(A); # Robert FERREOL, May 05 2020
  • Mathematica
    RecurrenceTable[{a[n]==a[n-1]^2-a[n-2]^2+a[n-2],a[0]==1,a[1]==2}, a, {n,0,10}] (* Vaclav Kotesovec, Jan 19 2015 *)
  • PARI
    a(n)=if(n<2,[1,2][n+1],a(n-1)^2-a(n-2)^2+a(n-2));
    

Formula

Sum_{n>=0} 1/a(n) = 1.82689305142092757947757234878575... (compare with Sum_{n>=0} 1/A000058(n) = 1).
a(n) ~ c^(2^n), where c = 1.385089248334672909882206535871311526236739234374149506334120193387331772... . - Vaclav Kotesovec, Jan 19 2015
Sum_{n>=1} arctan(1/a(n)) = Pi/4. - Carmine Suriano, Apr 07 2015
a(0)=1, a(n+1) = a(n)*(a(n)-1) + 2. - Robert FERREOL, May 05 2020
a(n) = A002065(n) + 1 = (A232806(n) + 1)/2. - Robert FERREOL, May 31 2020
Showing 1-2 of 2 results.