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

A222469 Denominator sequence of the n-th convergent of the continued fraction 1/(1 - 2/(2 - 2/(3 - 2/(4 - ...)))).

Original entry on oeis.org

1, 1, 0, -2, -8, -36, -200, -1328, -10224, -89360, -873152, -9425952, -111365120, -1428894656, -19781794944, -293869134848, -4662342567680, -78672085380864, -1406772851720192, -26571340011921920, -528613254534998016
Offset: 0

Views

Author

Gary Detlefs and Wolfdieter Lang, Mar 23 2013

Keywords

Comments

The corresponding numerator sequence is A222470(n).
a(n) = Q(n,-2) with the denominator polynomials Q of A084950. All the given formulas follow from there. The limit of the continued fraction (-1/2)*(0 + K_{k=1..oo} (-2/k)) = 1/(1 - 2/(2 - 2/(3 - 2/(4 - ...)))) is (+1/2)*sqrt(2)*BesselJ(1,2*sqrt(2))/BesselJ(0,2*sqrt(2)) = -1.43974932187... For more decimals see A222471.
For a combinatorial interpretation in terms of labeled Morse codes see a comment on A084950. Here each dash has label x = -2, and the dots have label j if they are at position j. Labels are multiplied and for a(n) all labeled codes on [1,2,...,n] have to be summed.

Examples

			a(4) = 4*a(3) - 2*a(2) = 4*(-2) + 2*0 = -8.
Continued fraction convergent: 1/(1 - 2/(2 - 2/(3 - 2/4))) = -3/2 = -12/8 = A222470(4)/a(4).
Morse code: a(4) = -8 from the sum of all 5 labeled codes on [1,2,3,4], one with no dash, three with one dash and one with two dashes: 4! + (3*4 + 1*4 + 1*2)*(-2) + (-2)^2 = -8.
		

Crossrefs

Cf. A001040(n+1) (x=1), A058797 (x=-1), A222467 (x=2).

Programs

  • Magma
    I:=[1, 1]; [n le 2 select I[n] else n*Self(n-1) - 2*Self(n-2): n in [1..30]]; // G. C. Greubel, May 17 2018
  • Mathematica
    RecurrenceTable[{a[0] == 1, a[1] == 1, a[n] == n*a[n - 1] - 2 a[n - 2]}, a[n], {n, 50}] (* G. C. Greubel, Aug 16 2017 *)
  • PARI
    m=30; v=concat([1,1], vector(m-2)); for(n=3, m, v[n]=n*v[n-1] -2*v[n-2]); v \\ G. C. Greubel, May 17 2018
    

Formula

a(n) = n*a(n-1) - 2*a(n-2), a(-1) = 0, a(0) = 1, n >= 1.
a(n) = Sum_{m=0..floor(n/2)} a(n-m, m)*(-2)^m, n >= 0, with a(n,m) = (n!/m!)*binomial(n,m) = |A021009(n,m)| (Laguerre).
a(n) = Pi*(z/2)^(n+1)*(BesselY(0,z)*BesselJ(n+1,z) - BesselJ(0,z)*BesselY(n+1,z)) with z := 2*sqrt(2).
E.g.f.: Pi*c/(2*sqrt(1-z))*(BesselJ(1, c*sqrt(1-z))*BesselY(0, c) - BesselY(1, c*sqrt(1-z))*BesselJ(0, c)), with c = 2*sqrt(2).
Asymptotics: lim_{n->oo} a(n)/n! = BesselJ(0, 2*sqrt(2)) = -0.1965480950...

A222471 Decimal expansion of the negative of the limit of the continued fraction 1/(1-2/(2-2/(3-2/(4-... in terms of Bessel functions.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Mar 23 2013

Keywords

Comments

The continued fraction (0 + K_{k=1..oo} (-2/k))/(-2) = 1/(1-2/(2-2/(3-2/(4- ... converges, and its negative limit is given in the formula section in terms of Bessel functions.
In general, the continued fraction 0 + K_{k=1..oo} (x/k) = x/(1+x/(2+x/(3+... has n-th approximation x*Phat(n,x)/Q(n,x), with the row polynomials Phat of A221913 and Q of A084950. These polynomials are written in terms of Bessel function. Divided by n! = Gamma(n+1) one knows the limit for n -> infinity for these two polynomial systems for given x. This results in the formula 0 + K_{k=1..oo} (x/k) = sqrt(x)*BesselI(1,2*sqrt(x))/BesselI(0,2*sqrt(x)).
For x=1 see for the limit of the continued fraction A052119 and for the n-th approximation A001053(n+1)/A001040(n+1).

Examples

			-1.4397493218702328058...
		

Crossrefs

Cf. A052119 (x=1), A222466 (x=2), A222469/A222470.

Programs

  • Mathematica
    RealDigits[BesselJ[1, 2*Sqrt[2]]/(Sqrt[2]*BesselJ[0, 2*Sqrt[2]]), 10, 50][[1]] (* G. C. Greubel, Aug 16 2017 *)
  • PARI
    besselj(1,sqrt(8))/besselj(0,sqrt(8))/sqrt(2) \\ Charles R Greathouse IV, Feb 19 2014

Formula

Equals (1/2)*sqrt(2)*BesselJ(1,2*sqrt(2))/BesselJ(0,2*sqrt(2)).

A303224 a(0)=0, a(1)=1; for n>1, a(n) = n*a(n-1) - 3*a(n-2).

Original entry on oeis.org

0, 1, 2, 3, 6, 21, 108, 693, 5220, 44901, 433350, 4632147, 54285714, 691817841, 9522592632, 140763435957, 2223647197416, 37379712048201, 666163875275370, 12544974494087427, 248900998255922430, 5189286039892108749, 113417589882858625188, 2593036709186072053077, 61892628250817153398284
Offset: 0

Views

Author

Bruno Berselli, Apr 20 2018

Keywords

Comments

a(n) is divisible by 3^floor(n/3).

Crossrefs

Cf. A058798: a(n) = n*a(n-1) - a(n-2).
Cf. A222470: a(n) = n*a(n-1) - 2*a(n-2), without 0.
Cf. A222472: a(n) = n*a(n-1) + 3*a(n-2), without 0.
Cf. A221913.

Programs

  • Mathematica
    RecurrenceTable[{a[0] == 0, a[1] == 1, a[n] == n a[n - 1] - 3 a[n - 2]}, a, {n, 0, 30}]
    Flatten[{0, Table[n!*HypergeometricPFQ[{1/2 - n/2, 1 - n/2}, {2, 1 - n, -n}, -12], {n, 1, 25}]}] (* Vaclav Kotesovec, Apr 20 2018 *)
    Round[Table[-2 I^n 3^(n/2) (BesselI[1 + n, -2 I Sqrt[3]] BesselK[1, -2 I Sqrt[3]] + (-1)^n BesselI[1, 2 I Sqrt[3]] BesselK[1 + n, -2 I Sqrt[3]]), {n, 0, 25}]] (* Vaclav Kotesovec, Apr 20 2018 *)
  • PARI
    a=vector(30); a[1]=0; a[2]=1; for(n=3, #a, a[n]=(n-1)*a[n-1]-3*a[n-2]); a

Formula

From Peter Bala, Apr 20 2018: (Start)
a(n) = Sum_{k = 0..floor((n-1)/2)} (-3)^k*binomial(n-k,k+1)*binomial(n-k-1,k)*(n-2*k-1)!.
a(n)/n! ~ BesselJ(1, 2*sqrt(3)) / sqrt(3). (End)
a(n) = -2 * i^n * 3^(n/2) * (BesselI(1+n, -2*i*sqrt(3)) * BesselK(1,-2*i*sqrt(3)) + (-1)^n * BesselI(1, 2*i*sqrt(3)) * BesselK(1+n, -2*i*sqrt(3))), where i is the imaginary unit. - Vaclav Kotesovec, Apr 20 2018
Showing 1-4 of 4 results.