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-3 of 3 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

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

Original entry on oeis.org

0, 1, 3, 14, 95, 841, 9156, 118187, 1763649, 29863846, 565649425, 11848774079, 271956154392, 6787055085721, 182978531160075, 5299590348556454, 164104322274089999, 5410143044696413513, 189190902242100382956, 6994653239913017755859, 272602285454365592095545
Offset: 0

Views

Author

Vladeta Jovovic, Apr 02 2000

Keywords

Comments

Numerators of successive convergents to tan(1) using continued fraction 1/(1-1/(3-1/(5-1/(7-1/(9-1/(11-1/(13-1/15-...))))))).
Equals eigensequence of an infinite lower triangular matrix with (1, 3, 5, 7, ...) as the main diagonal and (0, -1, -1, -1, ...) as the subdiagonal. - Gary W. Adamson, Apr 20 2009

Examples

			a(10)=565649425 because 1/(1-1/(3-1/(5-1/(7-1/(9-1/(11-1/(13-1/(15-1/(17-1/19))))))))) = 565649425/363199319.
		

Crossrefs

Programs

  • Magma
    [n le 2 select (n-1) else (2*n-3)*Self(n-1)-Self(n-2): n in [1..25] ]; // Vincenzo Librandi, May 12 2015
  • Maple
    f:= gfun:-rectoproc({a(n)=(2*n-1)*a(n-1)-a(n-2),a(0)=0,a(1)=1},a(n),remember):
    map(f, [$0..30]); # Robert Israel, May 14 2015
  • Mathematica
    CoefficientList[Series[Sin[1-Sqrt[1-2*x]]/Sqrt[1-2*x], {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Oct 05 2013 *)
    RecurrenceTable[{a[n] == (2*n - 1)*a[n - 1] - a[n - 2], a[0] == 0,
      a[1] == 1}, a, {n, 0, 50}] (* G. C. Greubel, Jan 22 2017 *)
  • PARI
    a(n)={if(n<2,n,(2*n-1)*a(n-1)-a(n-2))} \\ Edward Jiang, Sep 10 2014
    
  • PARI
    {a(n) = my(a0, a1, s=n<0); if( abs(n) < 2, return(n)); if( n<0, n=-1-n); a0=s; a1=1; for(k=2, n, a2 = (2*k-1)*a1 - a0; a0=a1; a1=a2); (-1)^(s*n) * a1}; /* Michael Somos, Sep 11 2014 */
    
  • Sage
    def A053984(n):
        if n < 2: return n
        return 2^n*gamma(n+1/2)*hypergeometric([1-n/2, 1/2-n/2],[3/2, 1 - n, 1/2 -n], -1) / sqrt(pi)
    [round(A053984(n).n(100)) for n in (0..20)] # Peter Luschny, Sep 10 2014
    

Formula

a(n) = (-1)^n*A053983(-1-n). - Michael Somos, Aug 23 2000 [See Somos's formula in A053983 which is valid for all n in Z.]
E.g.f.: sin(1-sqrt(1-2*x))/sqrt(1-2*x). Cf. A036244. - Vladeta Jovovic, Aug 10 2006
Recurrence equation: a(n+1) = (2*n+1)*a(n) - a(n-1) with a(0) = 0 and a(1) = 1.
a(n) = Sum_{k = 0..floor((n-1)/2)} (-1)^k*2^(n-2*k-1)*(n-2*k-1)!*binomial(n-k-1,k)*binomial(n-k-1/2,k+1/2), cf. A058798. - Peter Bala, Aug 01 2013
a(n) ~ sin(1)*2^(n+1/2)*n^n/exp(n). - Vaclav Kotesovec, Oct 05 2013
a(n) = (2*n-1)!!*hypergeometric([1 - n/2, 1/2 - n/2], [3/2, 1 - n, 1/2 - n], -1) for n >= 2. - Peter Luschny, Sep 10 2014
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 n in Z. - Michael Somos, Sep 11 2014
a(n) = SphericalBesselJ[n,1]*SphericalBesselY[0,1] - SphericalBesselJ[0,1]*SphericalBesselY[n,1]. - G. C. Greubel, May 10 2015
Sum_{n>=0} a(n-1)*t^n/n! = - cos(1 - sqrt(1-2*t)), where a(-1) = -1. - G. C. Greubel, May 10 2015
The SphericalBessel formula given by Greubel above can be rewritten as a(n) = sqrt(Pi/2)*(-cos(1)*BesselJ(n+1/2, 1) + (-1)^n*sin(1)*BesselJ(-(n+1/2), 1)). - Wolfdieter Lang, Jun 14 2015

Extensions

Additional comments from Michael Somos, Aug 23 2000
More terms from Vladeta Jovovic, Aug 10 2006

A025164 a(n) = a(n-2) + (2n-1)a(n-1); a(0)=1, a(1)=1.

Original entry on oeis.org

1, 1, 4, 21, 151, 1380, 15331, 200683, 3025576, 51635475, 984099601, 20717727096, 477491822809, 11958013297321, 323343850850476, 9388929687961125, 291380164177645351, 9624934347550257708, 337164082328436665131, 12484695980499706867555, 487240307321817004499776
Offset: 0

Views

Author

Keywords

Comments

Numerators of convergents to coth(1) = 1.313035... = A073747.
Numerator of continued fraction given by C(n) = [ 1; 3, 5, 7, ..., (2n-1)]. - Amarnath Murthy, May 02 2001
Equals eigensequence of an infinite lower triangular matrix with (1, 3, 5, ...) in the main diagonal, (1, 1, 1, ...) in the sum diagonal, and the rest zeros. - Gary W. Adamson, Apr 17 2009
We can use the defining recurrence to extend the sequence to negative indices to give a(-n) = A036244(n-1). - Peter Bala, Sep 11 2014

Examples

			G.f. = 1 + x + 4*x^2 + 21*x^3 + 151*x^4 + 1380*x^5 + 15331*x^6 + ...
		

Crossrefs

Programs

  • Magma
    [n le 2 select 1 else (2*n-3)*Self(n-1)+Self(n-2): n in [1..20]]; // Vincenzo Librandi, Apr 22 2015
    
  • Maple
    a:= proc(n) option remember;
          `if`(n<2, 1, a(n-2) +(2*n-1)*a(n-1))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Sep 17 2014
  • Mathematica
    a[ n_ ] := a[n] =a[n-2]+(-1+2 n) a[n-1]; a[0] := 1; a[1] := 1;
    RecurrenceTable[{a[0]==a[1]==1,a[n]==a[n-2]+(2n-1)a[n-1]},a,{n,20}] (* Harvey P. Dale, Mar 25 2012 *)
    a[ n_] := Round[ (Exp[1] + Exp[-1]) (BesselK[n - 3/2, 1] + (2 n - 1) BesselK[n - 1/2, 1]) / Sqrt[2 Pi]]; (* Michael Somos, Aug 26 2015 (n>=0) *)
    a[ n_] := Module[{ y = Sqrt[1 - 2 x]}, n! SeriesCoefficient[ Cosh[y - 1] / y, {x, 0, n}]]; (* Michael Somos, Aug 26 2015 (n>=0) *)
    a[ n_] := (BesselK[ 1/2, 1] BesselI[ n + 1/2, -1] - BesselI[ -1/2, -1] BesselK[ n + 1/2, 1]) / I // FunctionExpand // Simplify; (* Michael Somos, Aug 26 2015 *)
    Join[{1}, Convergents[Coth[1], 20] // Numerator] (* Jean-François Alcover, Jun 15 2019 *)
  • PARI
    a(n)={if(n<2,1,a(n-2)+(2*n-1)*a(n-1))} \\ Edward Jiang, Sep 11 2014
  • Sage
    def A025164(n):
        if n == 0: return 1
        return sloane.A001147(n)*hypergeometric([-n/2+1/2, -n/2], [1/2, -n, 1/2-n], 1)
    [round(A025164(n).n(100)) for n in (0..20)] # Peter Luschny, Sep 11 2014
    

Formula

E.g.f.: cosh((1-2*x)^(1/2)-1)/(1-2*x)^(1/2). - Vladeta Jovovic, Jan 30 2004
a(n) = round((exp(1)+exp(-1))*(BesselK(n-3/2, 1)+(2*n-1)*BesselK(n-1/2, 1))/sqrt(2*Pi) ). - Mark van Hoeij, Jul 02 2010
a(n) ~ sqrt(2)*cosh(1)*(2*n)^n/exp(n). - Vaclav Kotesovec, Jan 05 2013
a(n) = A001147(n)*hypergeometric([-n/2+1/2, -n/2], [1/2, -n, 1/2-n], 1) for n >= 1. - Peter Luschny, Sep 11 2014
a(n) = Sum_{k = 0..floor(n/2)} binomial(n - k, k)*( Product_{j = 1 .. n - 2*k} (2*k + 2*j - 1) ) = Sum_{k = 0..floor((n+1)/2)} 2^(2*k - n - 1)*(2*n + 2 - 2*k)!/( (n + 1 - 2*k)!*(2*k)! ). - Peter Bala, Sep 11 2014
a(n) = -i*( BesselK(1/2, 1)*BesselI(n+1/2, -1) - BesselI(-1/2, -1)*BesselK(n+1/2, 1)) for n>=0 (a(0)=1, a(1) = 1). - G. C. Greubel, Apr 21 2015
a(n) = A036244(-1-n) for all n in Z.
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)) if n >= 0. - Michael Somos, Jan 10 2017
Given e.g.f. A(x), then 0 = A(x) + 3*A'(x) + (2*x-1)*A''(x). - Michael Somos, Jan 10 2017
Given g.f. A(x), then 0 = 1 + (x^2+x-1)*A(x) + 2*x^2*A'(x). - Michael Somos, Jan 10 2017

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 15 2001
More terms from Vladeta Jovovic, Jan 30 2004
Showing 1-3 of 3 results.