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

A058798 a(n) = n*a(n-1) - a(n-2) with a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 2, 5, 18, 85, 492, 3359, 26380, 234061, 2314230, 25222469, 300355398, 3879397705, 54011212472, 806288789375, 12846609417528, 217586071308601, 3903702674137290, 73952764737299909, 1475151592071860890
Offset: 0

Views

Author

Christian G. Bower, Dec 02 2000

Keywords

Comments

Note that a(n) = (a(n-1) + a(n+1))/(n+1). - T. D. Noe, Oct 12 2012; corrected by Gary Detlefs, Oct 26 2018
a(n) = log_2(A073888(n)) = log_3(A073889(n)).
a(n) equals minus the determinant of M(n+2) where M(n) is the n X n symmetric tridiagonal matrix with entries 1 just above and below its diagonal and diagonal entries 0, 1, 2, .., n-1. Example: M(4)=matrix([[0, 1, 0, 0], [1, 1, 1, 0], [0, 1, 2, 1], [0, 0, 1, 3]]). - Roland Bacher, Jun 19 2001
a(n) = A221913(n,-1), n>=1, is the numerator sequence of the n-th approximation of the continued fraction -(0 + K_{k>=1} (-1/k)) = 1/(1-1/(2-1/(3-1/(4-... The corresponding denominator sequence is A058797(n). - Wolfdieter Lang, Mar 08 2013
The recurrence equation a(n+1) = (A*n + B)*a(n) + C*a(n-1) with the initial conditions a(0) = 0, a(1) = 1 has the solution a(n) = Sum_{k = 0..floor((n-1)/2)} C^k*binomial(n-k-1,k)*( Product_{j = 1..n-2k-1} (k+j)*A + B ). This is the case A = 1, B = 1, C = -1. - Peter Bala, Aug 01 2013

Examples

			Continued fraction approximation 1/(1-1/(2-1/(3-1/4))) = 18/7 = a(4)/A058797(4). - _Wolfdieter Lang_, Mar 08 2013
		

Crossrefs

Column 1 of A007754.
Cf. A073888, A073889, A221913 (alternating row sums).

Programs

  • GAP
    a:=[1,2];; for n in [3..25] do a[n]:=n*a[n-1]-a[n-2]; od; Concatenation([0], a); # Muniru A Asiru, Oct 26 2018
    
  • Magma
    [0] cat [n le 2 select n else n*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Sep 22 2016
    
  • Mathematica
    t = {0, 1}; Do[AppendTo[t, n*t[[-1]] - t[[-2]]], {n, 2, 25}]; t (* T. D. Noe, Oct 12 2012 *)
    nxt[{n_,a_,b_}]:={n+1,b,b*(n+1)-a}; Transpose[NestList[nxt,{1,0,1},20]] [[2]] (* Harvey P. Dale, Nov 30 2015 *)
  • PARI
    m=30; v=concat([1,2], vector(m-2)); for(n=3, m, v[n] = n*v[n-1]-v[n-2]); concat(0, v) \\ G. C. Greubel, Nov 24 2018
  • Sage
    def A058798(n):
        if n < 3: return n
        return hypergeometric([1/2-n/2, 1-n/2],[2, 1-n, -n], -4)*factorial(n)
    [simplify(A058798(n)) for n in (0..20)] # Peter Luschny, Sep 10 2014
    

Formula

a(n) = Sum_{k = 0..floor((n-1)/2)} (-1)^k*binomial(n-k-1,k)*(n-k)!/(k+1)!. - Peter Bala, Aug 01 2013
a(n) = A058797(n+1) + A058799(n-1). - Henry Bottomley, Feb 28 2001
a(n) = Pi*(BesselY(1, 2)*BesselJ(n+1, 2) - BesselJ(1,2)* BesselY(n+1,2)). See the Abramowitz-Stegun reference given under A103921, p. 361 eq. 9.1.27 (first line with Y, J and z=2) and p. 360, eq. 9.1.16 (Wronskian). - Wolfdieter Lang, Mar 05 2013
Limit_{n->oo} a(n)/n! = BesselJ(1,2) = 0.576724807756873... See a comment on asymptotics under A084950.
a(n) = n!*hypergeometric([1/2-n/2, 1-n/2], [2, 1-n, -n], -4) for n >= 2. - Peter Luschny, Sep 10 2014

Extensions

New description from Amarnath Murthy, Aug 17 2002

A121353 a(n) = (3*n - 2)*a(n-1) - a(n-2) starting a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 4, 27, 266, 3431, 54630, 1034539, 22705228, 566596161, 15841987280, 490535009519, 16662348336366, 616016353436023, 24623991789104554, 1058215630578059799, 48653295014801646200, 2382953240094702604001, 123864915189909733761852, 6810187382204940654297859
Offset: 0

Views

Author

Roger L. Bagula and Bob Hanlon (hanlonr(AT)cox.net), Sep 05 2006

Keywords

Comments

In the hypergeometric family a(n) = (a0*n+c0)*a(n-1)+b0*a(n-2) we have A053984, A058797, A121323, A121351, and this here with a0=3, where a(n) can be expressed in a characteristic cross-product of Bessel functions.

Crossrefs

Programs

  • Mathematica
    f[n_Integer] = Module[{a}, a[n] /. RSolve[{a[n] == (3*n - 2)*a[n - 1] - a[n - 2], a[0] == 0, a[1] == 1}, a[n], n][[1]] // FullSimplify] Rationalize[N[Table[f[n], {n, 0, 25}], 100], 0]
    RecurrenceTable[{a[0]==0, a[1]==1, a[n]==(3n-2)*a[n-1]-a[n-2]}, a, {n, 20}]  (* Vaclav Kotesovec, Jul 31 2014 *)
    nxt[{n_,a_,b_}]:={n+1,b,b(3n+1)-a}; NestList[nxt,{1,0,1},20][[;;,2]] (* Harvey P. Dale, Jun 03 2023 *)
  • Sage
    def A121353(n):
        if n < 2: return n
        return 3^n*gamma(n+1/3)*hypergeometric([1/2-n/2,1-n/2], [4/3, 2/3 -n, 1-n], -4/9)/gamma(1/3)
    [round(A121353(n).n(100)) for n in (0..19)] # Peter Luschny, Sep 10 2014

Formula

a(n) = (Pi/3) * (BesselJ(1/3+n,2/3) * BesselY(1/3,2/3) - BesselJ(1/3,2/3) * BesselY(1/3+n,2/3)).
a(n) = Sum_{k = 0..floor((n-1)/2)} (-1)^k*3^(n-2*k-1)*(n-2*k-1)!*binomial(n-k-1,k)*binomial(n-k-2/3,k+1/3), cf. A058798. - Peter Bala, Aug 01 2013
a(n) ~ n! * BesselJ(1/3, 2/3) * 3^(n-2/3) * n^(-2/3). - Vaclav Kotesovec, Jul 31 2014
a(n) = 3^n*Gamma(n+1/3)*hypergeometric([1/2-n/2, 1-n/2], [4/3, 2/3-n, 1-n], -4/9)/Gamma(1/3) for n >= 2. - Peter Luschny, Sep 10 2014

A121351 a(n) = (3*n+1)*a(n-1) - a(n-2), starting a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 7, 69, 890, 14171, 268359, 5889727, 146974816, 4109405121, 127244583935, 4322206448669, 159794394016818, 6387453554224051, 274500708437617375, 12620645134576175199, 618137110885794967376, 32130509120926762128353
Offset: 0

Views

Author

Roger L. Bagula and Bob Hanlon (hanlonr(AT)cox.net), Sep 05 2006

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_Integer] = Module[{a}, a[n] /. RSolve[{a[n] == (3*n + 1)*a[n - 1] - a[n - 2], a[0] == 0, a[1] == 1}, a[n], n][[1]] // FullSimplify] Rationalize[N[Table[f[n], {n, 0, 25}], 100], 0]
    RecurrenceTable[{a[0]==0, a[1]==1, a[n]==(3n+1)*a[n-1]-a[n-2]}, a, {n, 20}]  (* Vaclav Kotesovec, Jul 31 2014 *)
    nxt[{n_,a_,b_}]:={n+1,b,(3n+4)b-a}; NestList[nxt,{1,0,1},20][[All,2]] (* Harvey P. Dale, Jun 20 2021 *)

Formula

3*a(n)= Pi*BesselJ_{4/3 + n}(2/3)* BesselY_{4/3}(2/3) - Pi*BesselJ_{4/3}(2/3) * BesselY_{4/3 + n}(2/3).
a(n) = sum {k = 0..floor((n-1)/2)} (-1)^k*3^(n-2*k-1)*(n-2*k-1)!*binomial(n-k-1,k)*binomial(n-k+1/3,k+4/3), cf. A058798. - Peter Bala, Aug 01 2013
a(n) ~ n! * BesselJ(4/3, 2/3) * 3^(n+1/3) * n^(1/3). - Vaclav Kotesovec, Jul 31 2014

A242227 a(n) = (2*n-1) * a(n-1) - a(n-2), a(0) = 1, a(1) = 2.

Original entry on oeis.org

1, 2, 5, 23, 156, 1381, 15035, 194074, 2896075, 49039201, 928848744, 19456784423, 446577192985, 11144973040202, 300467694892469, 8702418178841399, 269474495849190900, 8883955944844458301, 310668983573706849635, 11485868436282308978194
Offset: 0

Views

Author

Michael Somos, May 08 2014

Keywords

Examples

			G.f. = 1 + 2*x + 5*x^2 + 23*x^3 + 156*x^4 + 1381*x^5 + 15035*x^6 + ...
		

Crossrefs

Programs

  • Magma
    I:=[1,2]; [n le 2 select I[n] else (2*n-1)*Self(n-1) - Self(n-2): n in [1..30]]; // G. C. Greubel, Aug 06 2018
  • Mathematica
    RecurrenceTable[{a[n] == (2*n-1)*a[n-1] - a[n-2], a[0] == 1, a[1] == 2}, a, {n, 0, 50}] (* G. C. Greubel, Aug 06 2018 *)
    nxt[{n_,a_,b_}]:={n+1,b,b(2n+1)-a}; NestList[nxt,{1,1,2},20][[All,2]] (* Harvey P. Dale, Aug 01 2022 *)
  • PARI
    {a(n) = if( n>-4, if( n<0, -2-n, (2*n - 1) * a(n-1) - a(n-2)), (2*n + 3) * a(n+1) - a(n+2))};
    

Formula

a(n) = A053983(n) + A053984(n) = -(-1)^n * A121323(-2-n) for all integer n.
0 = a(n)*(a(n+2)) + a(n+1)*(-a(n+1) + 2*a(n+2) - a(n+3)) + a(n+2)*(a(n+2)) for all integer n.
Showing 1-4 of 4 results.