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.

A003686 Number of genealogical 1-2 rooted trees of height n.

Original entry on oeis.org

1, 2, 3, 5, 11, 41, 371, 13901, 5033531, 69782910161, 351229174914190691, 24509789089655802510792656021, 8608552999157278575508415639286249242844899051
Offset: 1

Views

Author

Vsevolod F. Lev, c. 1998

Keywords

Comments

Let u(n), v(n) be defined by u(1) = v(1) = 1, u(n+1) = u(n) + v(n) and v(n+1) = u(n)*v(n) for n >= 1; then a(n) = u(n) and A064847(n) = v(n). - Benoit Cloitre, Apr 01 2002 [Edited by Petros Hadjicostas, May 11 2020]
Consider the mapping f(a/b) = (a + b)/(a*b). Taking a = 1 and b = 1 to start with and carrying out this mapping repeatedly on each new (reduced) rational number gives the following sequence 1/1, 2/1, 3/2, 5/6, 11/30, ... The current sequence contains the numerators. - Amarnath Murthy, Mar 24 2003
An infinite coprime sequence defined by recursion. - Michael Somos, Mar 19 2004

References

  • D. Parisse, The Tower of Hanoi and the Stern-Brocot Array, Thesis, Munich, 1997.

Crossrefs

Programs

  • Magma
    I:=[1,2]; [n le 2 select I[n] else Self(n-1)+Self(n-2)*(Self(n-1)-Self(n-2)): n in [1..14]]; // Vincenzo Librandi, Jul 19 2016
  • Mathematica
    RecurrenceTable[{a[1]==1, a[2]==2, a[n]==a[n-1]+a[n-2](a[n-1]-a[n-2])}, a[n],{n,15}] (* Harvey P. Dale, Jul 27 2011 *)
    Re[NestList[Re@#+(1+I Re@#)Im@#&, 1+I, 15]] (* Vladimir Reshetnikov, Jul 18 2016 *)
  • PARI
    a(n) = local(an); if(n<1, 0, an=vector(max(2,n)); an[1]=1; an[2]=2; for(k=3, n, an[k]=an[k-1] - an[k-2]^2 + an[k-1]*an[k-2]); an[n])
    

Formula

Limit_{n -> infinity} a(n)^phi/A064847(n) = 1, where phi = (1 + sqrt(5))/2 is the golden ratio. - Benoit Cloitre, May 08 2002
Numerator of b(n), where b(n) = 1/numerator(b(n-1)) + 1/denominator(b(n-1)) for n >= 2 with b(1) = 1.
a(n+1) = a(n) + a(1)*a(2)*...*a(n-1) for n >= 2. Also a(n+1) = a(n) + a(n-1)*(a(n) - a(n-1)) for n >= 2. In both cases, we start with a(1) = 1 and a(2) = 2.
a(n) ~ c^(phi^n), where c = 1.22508584062304325811405322247537613534139348463831009881946422737141574647... and phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, May 21 2015

Extensions

Additional description from Andreas M. Hinz and Daniele Parisse

A064526 Define a pair of sequences by p(0) = 0, q(0) = p(1) = q(1) = 1, q(n+1) = p(n)*q(n-1), p(n+1) = q(n+1) + q(n) for n > 0; then a(n) = p(n) and A064183(n) = q(n).

Original entry on oeis.org

0, 1, 2, 3, 5, 13, 49, 529, 21121, 10369921, 213952189441, 2214253468601687041, 473721461635593679669210030081, 1048939288228833101089604217183056027094304481281
Offset: 0

Views

Author

Michael Somos, Oct 07 2001

Keywords

Comments

Every nonzero term is relatively prime to all others (which proves that there are infinitely many primes). See A236394 for the primes that appear.

Crossrefs

See A236394 for the primes that are produced.

Programs

  • Mathematica
    Flatten[{0,1, RecurrenceTable[{a[n]==(a[n-1]^2 + a[n-2]^2 - a[n-1]*a[n-2] * (1+a[n-2]))/(1-a[n-2]), a[2]==2, a[3]==3},a,{n,2,15}]}] (* Vaclav Kotesovec, May 21 2015 *)
  • PARI
    {a(n) = local(v); if( n<3, max(0, n), v = [1,1]; for( k=3, n, v = [v[2], v[1] * (v[1] + v[2])]); v[1] + v[2])}
    
  • PARI
    {a(n) = if( n<4, max(0, n), (a(n-1)^2 + a(n-2)^2 - a(n-1) * a(n-2) * (1 + a(n-2))) / (1 - a(n-2)))}

Formula

a(n) = (a(n-1)^2 + a(n-2)^2 - a(n-1) * a(n-2) * (1 + a(n-2))) / (1 - a(n-2)) for n >= 2.
a(n) ~ c^(phi^n), where c = 1.2364241784241086061606568429916822975882631646194967549068405592472125928485... and phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, May 21 2015

A070231 Let u(k), v(k), w(k) satisfy the recursions u(1) = v(1) = w(1) = 1, u(k+1) = u(k) + v(k) + w(k), v(k+1) = u(k)*v(k) + v(k)*w(k) + w(k)*u(k), and w(k+1) = u(k)*v(k)*w(k) for k >= 1; then a(n) = u(n).

Original entry on oeis.org

1, 3, 7, 31, 1279, 9202687, 3692849258577919, 98367959484921734629696721986125823, 3882894052327310957045599009145809243674851356642054390303168725061781159935999
Offset: 1

Views

Author

Benoit Cloitre, May 08 2002

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = 1; v[1] = 1; w[1] = 1; a[k_] := a[k] = a[k - 1] + v[k - 1] + w[k - 1]; v[k_] := v[k] = a[k - 1]*v[k - 1] + v[k - 1]*w[k - 1] + w[k - 1]*a[k - 1]; w[k_] := w[k] = a[k - 1]*v[k - 1]*w[k - 1]; Table[a[n], {n, 1, 9}] (* Vaclav Kotesovec, May 11 2020 *)
  • PARI
    lista(nn) = {my(u = vector(nn)); my(v = vector(nn)); my(w = vector(nn)); u[1] = 1; v[1] = 1; w[1] = 1; for (n=2, nn, u[n] = u[n-1] + v[n-1] + w[n-1]; v[n] = u[n-1]*v[n-1] + v[n-1]*w[n-1] + w[n-1]*u[n-1]; w[n] = u[n-1]*v[n-1]*w[n-1];); u; } \\ Petros Hadjicostas, May 11 2020

Formula

Let C be the positive root of x^3 + x^2 - 2*x - 1 = 0; that is, C = 1.246979603717... = A255249. Then Lim_{n -> infinity} u(n)^(C+1)/w(n)= Lim_{n -> infinity} v(n)^C/w(n) = Lim_{n -> infinity} u(n)^B/v(n) = 1 with B = C + 1 - 1/(1 + C) = 1.8019377... = A160389. [corrected by Vaclav Kotesovec, May 11 2020]
a(n) ~ gu^((1 + C)^n), where C is defined above and gu = 1.131945853718244297... The relation between constants gu, gv (see A070234) and gw (see A070233) is gu^(1 + C) = gv^C = gw. - Vaclav Kotesovec, May 11 2020

A070233 Let u(k), v(k), w(k) satisfy the recursions u(1) = v(1) = w(1) = 1, u(k+1) = u(k) + v(k) + w(k), v(k+1) = u(k)*v(k) + v(k)*w(k) + w(k)*u(k), and w(k+1) = u(k)*v(k)*w(k) for k >= 1; then a(n) = w(n).

Original entry on oeis.org

1, 1, 9, 945, 8876385, 3689952451492545, 98367948795841301790914258556831105, 3882894052327309905582682317031276840071039865528864289025562807872336355445505
Offset: 1

Views

Author

Benoit Cloitre, May 08 2002

Keywords

Comments

Next term is too large to include.

Crossrefs

Programs

  • Mathematica
    u[1] = 1; v[1] = 1; a[1] = 1; u[k_] := u[k] = u[k - 1] + v[k - 1] + a[k - 1]; v[k_] := v[k] = u[k - 1]*v[k - 1] + v[k - 1]*a[k - 1] + a[k - 1]*u[k - 1]; a[k_] := a[k] = u[k - 1]*v[k - 1]*a[k - 1]; Table[a[n], {n, 1, 9}] (* Vaclav Kotesovec, May 11 2020 *)
  • PARI
    lista(nn) = {my(u = vector(nn)); my(v = vector(nn)); my(w = vector(nn)); u[1] = 1; v[1] = 1; w[1] = 1; for (n=2, nn, u[n] = u[n-1] + v[n-1] + w[n-1]; v[n] = u[n-1]*v[n-1] + v[n-1]*w[n-1] + w[n-1]*u[n-1]; w[n] = u[n-1]*v[n-1]*w[n-1]; ); w; } \\ Petros Hadjicostas, May 11 2020

Formula

Let C be the positive root of x^3 + x^2 - 2*x - 1 = 0: that is, C = 1.246979603717... = A255249. Then Lim_{n -> infinity} u(n)^(C+1)/w(n)= Lim_{n -> infinity} v(n)^C/w(n) = Lim_{n -> infinity} u(n)^B/v(n) = 1 with B = C + 1 - 1/(1 + C) = 1.8019377... = A160389. [corrected by Vaclav Kotesovec, May 11 2020]
a(n) ~ gw^((C + 1)^n), where C is defined above and gw = 1.321128752475732548... The relation between constants gu (see A070231), gv (see A070234) and gw is gu^(1 + C) = gv^C = gw. - Vaclav Kotesovec, May 11 2020

A070234 Let u(k), v(k), w(k) satisfy the recursions u(1) = v(1) = w(1) = 1, u(k+1) = u(k) + v(k) + w(k), v(k+1) = u(k)*v(k) + v(k)*w(k) + w(k)*u(k), and w(k+1) = u(k)*v(k)*w(k); then a(n) = v(n).

Original entry on oeis.org

1, 3, 15, 303, 325023, 2896797882687, 10689080432835089614170716799, 1051462916692114532403603811392745230616355871287492722818364671
Offset: 1

Views

Author

Benoit Cloitre, May 08 2002

Keywords

Crossrefs

Programs

Formula

Let C be the positive root of x^3 + x^2 - 2*x - 1 = 0; that is, C = 1.246979603717... = A255249. Then Lim_{n -> infinity} u(n)^(C+1)/w(n) = Lim_{n -> infinity} v(n)^C/w(n) = Lim_{n -> infinity} u(n)^B/v(n) = 1 with B = C + 1 - 1/(1 + C) = 1.8019377... = A160389. [corrected by Vaclav Kotesovec, May 11 2020]
a(n) ~ gv^((C + 1)^n), where C is defined above and gv = 1.250231610564761084... The relation between constants gu (see A070231), gv and gw (see A070233) is gu^(1 + C) = gv^C = gw. - Vaclav Kotesovec, May 11 2020

A094303 a(1) = 1, a(2) = 2, and a(n+1) = a(n) * sum of all previous terms up to a(n-1) for n >= 2.

Original entry on oeis.org

1, 2, 2, 6, 30, 330, 13530, 5019630, 69777876630, 351229105131280530, 24509789089304573335878465330, 8608552999157278550998626549630446732052243030
Offset: 1

Views

Author

Amarnath Murthy, Apr 29 2004

Keywords

Comments

From Petros Hadjicostas, May 11 2020: (Start)
R. J. Mathar's conjecture is correct and this is identical to A064847 starting at n = 3. To see why this is the case, consider the sequences u(n) and v(n) defined by u(1) = v(1) = 1, and u(k+1) = u(k) + v(k), v(k+1) = u(k)*v(k) for k >= 1. Then u(n) = A003686(n) and v(n) = A064847(n) for n >= 1.
Then v(n) = u(n+1) - u(n), and thus Sum_{k=1..n-1} v(k) = u(n) - u(1) = u(n) - 1 for n >= 2. Then v(n-1) + ... + v(3) + (v(2) + 1) + v(1) = u(n) for n >= 3, and hence v(n)*(v(n-1) + ... + v(3) + (v(2) + 1) + v(1)) = u(n)*v(n) = v(n+1).
Since v(1) = 1 = a(1) and v(2) + 1 = 2 = a(2), the sequence (v(1), v(2) + 1, v(3), ..., v(n), ...) is identical to the current sequence. Hence, a(n) = v(n) = u(n+1) - u(n) = A003686(n+1) - A003686(n) for n >= 3. (End)

Crossrefs

See A064847 for another version.

Programs

  • Mathematica
    nxt[{t1_,t2_,a_}]:=Module[{c=t1*a},{t1+t2,c,c}]; Join[{1},NestList[nxt,{1,2,2},10][[All,2]]] (* Harvey P. Dale, Aug 30 2020 *)
  • PARI
    lista(nn) = { my(va = vector(nn)); va[1] = 1; va[2] = 2; for(n=3, nn, va[n] = va[n-1]*sum(k=1, n-2, va[k]);); va; } \\ Petros Hadjicostas, May 11 2020

Formula

Conjecture: a(n) = A003686(n+1) - A003686(n) for n >= 3. - R. J. Mathar, Apr 24 2007

Extensions

More terms from Gareth McCaughan, Jun 10 2004

A064183 Define a pair of sequences by p(0) = 0, q(0) = p(1) = q(1) = 1, q(n+1) = p(n)*q(n-1), p(n+1) = q(n+1) + q(n) for n > 0; then a(n) = q(n) and A064526(n) = p(n).

Original entry on oeis.org

1, 1, 1, 2, 3, 10, 39, 490, 20631, 10349290, 213941840151, 2214253254659846890, 473721461633379426414550183191, 1048939288228833100615882755549676600679754298090
Offset: 0

Views

Author

Michael Somos, Sep 20 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[{1, RecurrenceTable[{a[n]==(a[n-1]+a[n-2])*a[n-2], a[1]==1, a[2]==1},a,{n,1,10}]}] (* Vaclav Kotesovec, May 21 2015 *)
  • PARI
    {a(n) = local(v); if( n<3, n>=0, v = [1,1]; for( k=3, n, v = [v[2], v[1] * (v[1] + v[2])]); v[2])}
    
  • PARI
    {a(n) = if( n<3, n>=0, (a(n-1) + a(n-2)) * a(n-2))}

Formula

a(n) = (a(n-1) + a(n-2))*a(n-2) for n >= 2.
Lim_{n -> infinity} a(n)/a(n-1)^phi = 1, where phi = A001622. - Gerald McGarvey, Aug 29 2004
a(n) ~ c^(phi^n), where c = 1.23642417842410860616065684299168229758826316461949675490684055924721259... and phi = A001622 = (1 + sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, May 21 2015

A001697 a(n+1) = a(n)(a(0) + ... + a(n)).

Original entry on oeis.org

1, 1, 2, 8, 96, 10368, 108615168, 11798392572168192, 139202068568601556987554268864512, 19377215893777651167043206536157390321290709180447278572301746176
Offset: 0

Views

Author

Keywords

Comments

Number of binary trees of height n where for each node the left subtree is at least as high as the right subtree. - Franklin T. Adams-Watters, Feb 08 2007
The next term (a(10)) has 129 digits. - Harvey P. Dale, Jan 24 2016
Number of plane trees where the root has exactly n children and the i-th child of any node has at most i-1 children. - David Eppstein, Dec 18 2021

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

a(n) = A039941(2*n+1); first differences of A001696 give this sequence.
Cf. A064847.

Programs

  • Haskell
    a001697 n = a001697_list !! n
    a001697_list = 1 : 1 : f [1,1] where
       f xs@(x:_) = y : f (y : xs) where y = x * sum xs
    -- Reinhard Zumkeller, Apr 29 2013
    
  • Magma
    [n le 2 select 1 else Self(n-1)^2*(1+1/Self(n-2)): n in [1..12]]; // Vincenzo Librandi, Nov 25 2015
  • Mathematica
    a[0] = 1; a[1] = 1; a[n_] := a[n] = a[n - 1]^2*(1 + 1/a[n - 2]); Table[a[n], {n, 0, 9}]  (* Jean-François Alcover, Jul 02 2013 *)
    nxt[{t_,a_}]:={t+t*a,t*a}; Transpose[NestList[nxt,{1,1},10]][[2]] (* Harvey P. Dale, Jan 24 2016 *)
  • PARI
    a(n)=if(n<2,n >= 0,a(n-1)^2*(1+1/a(n-2)))
    

Formula

a(n) ~ c^(2^n), where c = 1.3352454783981919948826893254756974184778316104856161827213437094446034867599... . - Vaclav Kotesovec, May 21 2015

Extensions

Additional comments from Michael Somos, May 19 2000

A296516 a(n) is the number of terms in expanded form of bivariate polynomial Q_n, where (P_n, Q_n) is defined by: P_0 = x, Q_0 = y, P_(n+1) = P_n + Q_n, Q_(n+1) = P_n * Q_n.

Original entry on oeis.org

1, 1, 2, 5, 14, 40, 111, 300, 797, 2098, 5499, 14389, 37634, 98435, 257516, 673827, 1763460, 4615686, 12082137, 31628294
Offset: 0

Views

Author

Luc Rousseau, Feb 27 2018

Keywords

Comments

Programs based on the direct application of the definition quickly reach a limitation by combinatorial explosion, hence this short list of values in section Data. The first conjectured formula (see Formulas) obtained by the observation of a pattern in the 2D shape of Q_n (as drawn in the Examples) is more computationally efficient and makes it possible to produce a significantly longer list of (nonguaranteed) values: see attached a-file in b-file format, section Links.
A003686 and A064847 are values of P_n and Q_n at x=y=1 (i.e., sums of coefficients in these polynomials). At x=2, y=1 (or vice versa) P_n and Q_n seem to give same sequences but shifted. At x=y=-1, P_n seems to give A000058 negated interleaved with -1's, while Q_n seems to give A007018 interleaved with the same sequence negated. - Andrey Zabolotskiy, May 22 2018

Examples

			Q_0 = y -> one term -> a(0) = 1;
Q_1 = x*y -> one term -> a(1) = 1;
Q_2 = x^2*y + x*y^2 -> two terms -> a(2) = 2;
Q_3 = x^3*y + 2*x^2*y^2 + x^3*y^2 + x*y^3 + x^2*y^3 -> five terms -> a(3) = 5;
...
Locations of terms in 2D arrays indexed by the exponents of x and y:
   0: .   1: ..   2: ...   3: ....   4: ......   5: .........
      X      .X      ..X      ...X      ....X.      .....X...
                     .X.      ..XX      ...XXX      ....XXXX.
                              .XX.      ..XXXX      ...XXXXXX
                                        .XXXX.      ..XXXXXXX
                                        ..XX..      .XXXXXXXX
                                                    ..XXXXXX.
                                                    ..XXXXX..
                                                    ...XXX...
		

Crossrefs

Cf. A005207 (which with +1 added appears to be to P_n as a(n) is to Q_n).

Programs

  • Mathematica
    {p[0], q[0]} := {x, y};
    {p[n_], q[n_]} := {p[n - 1] + q[n - 1], p[n - 1] q[n - 1]};
    a[n_] := Length@CoefficientRules[q[n]];
    Table[a[n], {n, 0, 10}] (* Andrey Zabolotskiy, Peter Luschny, May 30 2018 *)
    From Luc Rousseau, Feb 27 2018: (Start)
    (* conjectured: *)
    T[n_] := n*(n + 1)/2
    F[n_] := Fibonacci[n]
    V[n_] := Sum[F[k]*(Sum[(n - 2 - l)*F[l], {l, k + 1, n - 3}]), {k, 1, n - 4}]
    W[n_] := Sum[(n - 2 - l)*T[F[l]], {l, 1, n - 3}]
    AA[n_] := (F[n + 1])^2 - T[n - 1] - T[F[n - 1]] - 2*V[n] - 2 W[n]
    Table[AA[n], {n, 1, 50}]
    (End)
  • Python
    def A296516(n):
        P, Q = {(1,0)}, {(0,1)}
        for _ in range(n): P, Q = P|Q, set((p[0]+q[0],p[1]+q[1]) for p in P for q in Q)
        return len(Q) # Chai Wah Wu, Oct 18 2021

Formula

Conjectured:
a(n) = F(n+1)^2 - T(n-1) - T(F(n-1)) - 2*V(n) - 2*W(n) for n > 0, where
F(n) is the n-th Fibonacci number,
T(n) is the n-th triangular number,
V(n) = Sum_{i=1..n-4} F(i)*(Sum_{j=i+1..n-3} (n-2-j)*F(j)),
W(n) = Sum_{i=1..n-3} (n-2-i)*T(F(i)).
Or:
a(n) = F(n+1)^2 - T(n-1) - T(F(n-1)) - [n>=4]*U(n) where [] is the Iverson bracket, and U(n) = F(n-1)*F(n-3) + F(n+1)*(2*F(n-4)-1) + 5 - 8*(n mod 2).
Conjectures from Colin Barker, Mar 28 2018: (Start)
G.f.: 1 + x*(1 - 5*x + 9*x^2 - 5*x^3 - 2*x^4 + x^5) / ((1 - x)^3*(1 - 3*x + x^2)*(1 - x - x^2)).
a(n) = 7*a(n-1) - 18*a(n-2) + 20*a(n-3) - 6*a(n-4) - 6*a(n-5) + 5*a(n-6) - a(n-7) for n > 7.
(End)
From Luc Rousseau, Mar 30 2018: (Start)
Derived from the conjectured order-7 linear recurrence above, for n > 0,
a(n) = -(1/2)*n^2 + (1/2)*n - 1 + ((2+phi)/10)*(phi^2)^n + ((4-3*phi)/10)*(-phi^(-1))^n + ((1+3*phi)/10)*phi^n + ((3-phi)/10)*(phi^(-2))^n,
where phi denotes the golden ratio and lim_{n->oo} a(n+1)/a(n) = phi^2.
a(n) = (F(2*n+1) + F(n+2) - n^2 + n - 2) / 2.
(End)

Extensions

a(15)-a(19) from Andrey Zabolotskiy, May 30 2018
Showing 1-9 of 9 results.