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

A053988 Denominators of successive convergents to tan(1/2) using continued fraction 1/(2-1/(6-1/(10-1/(14-1/(18-1/(22-1/(26-1/30-...))))))).

Original entry on oeis.org

2, 11, 108, 1501, 26910, 590519, 15326584, 459207001, 15597711450, 592253828099, 24859063068708, 1142924647332469, 57121373303554742, 3083411233744623599, 178780730183884614000, 11081321860167101444401, 731188462040844810716466, 51172111020998969648708219
Offset: 1

Views

Author

Vladeta Jovovic, Apr 03 2000

Keywords

Crossrefs

Cf. A001497, A053987 (numerators), A161011 (tan(1/2)).

Programs

  • Magma
    [(&+[ (-1)^k*Factorial(2*n-2*k)/(Factorial(n-2*k)*Factorial(2*k)): k in [0..Floor(n/2)]] ): n in [1..20]]; // G. C. Greubel, May 13 2020
    
  • Maple
    a:= n -> add((-1)^k*(2*n-2*k)!/((n-2*k)!*(2*k)!), k = 0..floor(n/2));
    seq(a(n), n = 1..20); # G. C. Greubel, May 13 2020
  • Mathematica
    Table[Sum[(-1)^k*(2*n-2*k)!/((n-2*k)!*(2*k)!), {k,0,Floor[n/2]}], {n, 20}] (* G. C. Greubel, May 13 2020 *)
  • PARI
    a(n)=sum(k=0,floor(n/2),(-1)^k*(2*n-2*k)!/(n-2*k)!/(2*k)!) \\ Benoit Cloitre, Jan 03 2006
    
  • Sage
    [sum((-1)^k*factorial(2*n-2*k)/(factorial(n-2*k)*factorial(2*k)) for k in (0..floor(n/2))) for n in (1..20)] # G. C. Greubel, May 13 2020

Formula

a(n) = Sum_{k=0..floor(n/2)} (-1)^k*(2*n-2*k)!/((n-2*k)!*(2*k)!) - Benoit Cloitre, Jan 03 2006
From G. C. Greubel, May 13 2020: (Start)
E.g.f.: cos((1 - sqrt(1-4*x))/2)/sqrt(1-4*x) - 1.
a(n) = 2*(2*n-1)*a(n-1) - a(n-2).
a(n) = ((-i)^n/2)*(y(n, 2*i) + (-1)^n*y(n, -2*i)), where y(n, x) are the Bessel Polynomials. (End)
a(n) ~ cos(1/2) * 2^(2*n + 1/2) * n^n / exp(n). - Vaclav Kotesovec, May 14 2020

Extensions

More terms from G. C. Greubel, May 13 2020

A334823 Triangle, read by rows, of Lambert's denominator polynomials related to convergents of tan(x).

Original entry on oeis.org

1, 1, 0, 3, 0, -1, 15, 0, -6, 0, 105, 0, -45, 0, 1, 945, 0, -420, 0, 15, 0, 10395, 0, -4725, 0, 210, 0, -1, 135135, 0, -62370, 0, 3150, 0, -28, 0, 2027025, 0, -945945, 0, 51975, 0, -630, 0, 1, 34459425, 0, -16216200, 0, 945945, 0, -13860, 0, 45, 0, 654729075, 0, -310134825, 0, 18918900, 0, -315315, 0, 1485, 0, -1
Offset: 0

Views

Author

G. C. Greubel, May 12 2020, following a suggestion from Michel Marcus

Keywords

Comments

Lambert's numerator polynomials related to convergents of tan(x), g(n, x), are given in A334824.

Examples

			Polynomials:
f(0, x) = 1;
f(1, x) = x;
f(2, x) = 3*x^2 - 1;
f(3, x) = 15*x^3 - 6*x;
f(4, x) = 105*x^4 - 45*x^2 + 1;
f(5, x) = 945*x^5 - 420*x^3 + 15*x;
f(6, x) = 10395*x^6 - 4725*x^4 + 210*x^2 - 1;
f(7, x) = 135135*x^7 - 62370*x^5 + 3150*x^3 - 28*x;
f(8, x) = 2027025*x^8 - 945945*x^6 + 51975*x^4 - 630*x^2 + 1.
Triangle of coefficients begins as:
        1;
        1, 0;
        3, 0,      -1;
       15, 0,      -6, 0;
      105, 0,     -45, 0,     1;
      945, 0,    -420, 0,    15, 0;
    10395, 0,   -4725, 0,   210, 0,   -1;
   135135, 0,  -62370, 0,  3150, 0,  -28, 0;
  2027025, 0, -945945, 0, 51975, 0, -630, 0, 1.
		

Crossrefs

Columns k: A001147 (k=0), A001879 (k=2), A001880 (k=4), A038121 (k=6).

Programs

  • Magma
    C := ComplexField();
    T:= func< n, k| Round( i^k*Factorial(2*n-k)*(1+(-1)^k)/(2^(n-k+1)*Factorial(k)*Factorial(n-k)) ) >;
    [T(n,k): k in [0..n], n in [0..10]];
    
  • Maple
    T:= (n, k) -> I^k*(2*n-k)!*(1+(-1)^k)/(2^(n-k+1)*(k)!*(n-k)!);
    seq(seq(T(n, k), k = 0 .. n), n = 0 .. 10);
  • Mathematica
    (* First program *)
    y[n_, x_]:= Sqrt[2/(Pi*x)]*E^(1/x)*BesselK[-n -1/2, 1/x];
    f[n_, k_]:= Coefficient[((-I)^n/2)*(y[n, I*x] + (-1)^n*y[n, -I*x]), x, k];
    Table[f[n, k], {n,0,10}, {k,n,0,-1}]//Flatten
    (* Second program *)
    Table[ I^k*(2*n-k)!*(1+(-1)^k)/(2^(n-k+1)*(k)!*(n-k)!), {n,0,10}, {k,0,n}]//Flatten
  • Sage
    [[ i^k*factorial(2*n-k)*(1+(-1)^k)/(2^(n-k+1)*factorial(k)*factorial(n-k)) for k in (0..n)] for n in (0..10)]

Formula

Equals the coefficients of the polynomials, f(n, x), defined by: (Start)
f(n, x) = Sum_{k=0..floor(n/2)} ((-1)^k*(2*n-2*k)!/((2*k)!*(n-2*k)!))*(x/2)^(n-2*k).
f(n, x) = ((2*n)!/n!)*(x/2)^n*Hypergeometric2F3(-n/2, (1-n)/2; 1/2, -n, -n+1/2; -1/x^2).
f(n, x) = ((-i)^n/2)*(y(n, i*x) + (-1)^n*y(n, -i*x)), where y(n, x) are the Bessel Polynomials.
f(n, x) = (2*n-1)*x*f(n-1, x) - f(n-2, x).
E.g.f. of f(n, x): cos((1 - sqrt(1-2*x*t))/2)/sqrt(1-2*x*t).
f(n, 1) = (-1)^n*f(n, -1) = A053983(n) = (-1)^(n+1)*A053984(-n-1) = (-1)^(n+1) * g(-n-1, 1).
f(n, 2) = (-1)^n*f(n, -2) = A053988(n+1). (End)
As a number triangle:
T(n, k) = i^k*(2*n-k)!*(1+(-1)^k)/(2^(n-k+1)*(k)!*(n-k)!), where i = sqrt(-1).
T(n, 0) = A001147(n).

A334824 Triangle, read by rows, of Lambert's numerator polynomials related to convergents of tan(x).

Original entry on oeis.org

1, 3, 0, 15, 0, -1, 105, 0, -10, 0, 945, 0, -105, 0, 1, 10395, 0, -1260, 0, 21, 0, 135135, 0, -17325, 0, 378, 0, -1, 2027025, 0, -270270, 0, 6930, 0, -36, 0, 34459425, 0, -4729725, 0, 135135, 0, -990, 0, 1, 654729075, 0, -91891800, 0, 2837835, 0, -25740, 0, 55, 0, 13749310575, 0, -1964187225, 0, 64324260, 0, -675675, 0, 2145, 0, -1
Offset: 0

Author

G. C. Greubel, May 13 2020, following a suggestion from Michel Marcus

Keywords

Comments

Lambert's denominator polynomials related to convergents of tan(x), f(n, x), are given in A334823.

Examples

			Polynomials:
g(0, x) = 1;
g(1, x) = 3*x;
g(2, x) = 15*x^2 - 1;
g(3, x) = 105*x^3 - 10*x;
g(4, x) = 945*x^4 - 105*x^2 + 1;
g(5, x) = 10395*x^5 - 1260*x^3 + 21*x;
g(6, x) = 135135*x^6 - 17325*x^4 + 378*x^2 - 1;
g(7, x) = 2027025*x^7 - 270270*x^5 + 6930*x^3 - 36*x.
Triangle of coefficients begins as:
        1;
        3, 0;
       15, 0,      -1;
      105, 0,     -10, 0;
      945, 0,    -105, 0,    1;
    10395, 0,   -1260, 0,   21, 0;
   135135, 0,  -17325, 0,  378, 0,  -1;
  2027025, 0, -270270, 0, 6930, 0, -36, 0.
		

Crossrefs

Columns k: A001147 (k=0), A000457 (k=2), A001881 (k=4), A130563 (k=6).

Programs

  • Magma
    C := ComplexField();
    T:= func< n, k| Round( i^k*Factorial(2*n-k+1)*(1+(-1)^k)/(2^(n-k+1)*Factorial(k+1)*Factorial(n-k)) ) >;
    [T(n,k): k in [0..n], n in [0..10]];
    
  • Maple
    T:= (n, k) -> I^k*(2*n-k+1)!*(1+(-1)^k)/(2^(n-k+1)*(k+1)!*(n-k)!);
    seq(seq(T(n, k), k = 0..n), n = 0..10);
  • Mathematica
    (* First program *)
    y[n_, x_]:= Sqrt[2/(Pi*x)]*E^(1/x)*BesselK[-n -1/2, 1/x];
    g[n_, k_]:= Coefficient[((-I)^n/2)*(y[n+1, I*x] + (-1)^n*y[n+1, -I*x]), x, k];
    Table[g[n, k], {n,0,10}, {k,n,0,-1}]//Flatten
    (* Second program *)
    Table[I^k*(2*n-k+1)!*(1+(-1)^k)/(2^(n-k+1)*(k+1)!*(n-k)!), {n,0,10}, {k,0,n}]//Flatten
  • Sage
    [[ i^k*factorial(2*n-k+1)*(1+(-1)^k)/(2^(n-k+1)*factorial(k+1)*factorial(n-k)) for k in (0..n)] for n in (0..10)]

Formula

Equals the coefficients of the polynomials, g(n, x), defined by: (Start)
g(n, x) = Sum_{k=0..floor(n/2)} ((-1)^k*(2*n-2*k+1)!/((2*k+1)!*(n-2*k)!))*(x/2)^(n-2*k).
g(n, x) = ((2*n+1)!/n!)*(x/2)^n*Hypergeometric2F3(-n/2, (1-n)/2; 3/2, -n, -n-1/2; -1/x^2).
g(n, x) = ((-i)^n/2)*(y(n+1, i*x) + (-1)^n*y(n+1, -i*x)), where y(n, x) are the Bessel Polynomials.
g(n, x) = (2*n-1)*x*g(n-1, x) - g(n-2, x).
E.g.f. of g(n, x): sin((1 - sqrt(1-2*x*t))/2)/sqrt(1-2*x*t).
g(n, 1) = (-1)^n*g(n, -1) = A053984(n) = (-1)^n*A053983(-n-1) = (-1)^n*f(-n-1, 1).
g(n, 2) = (-1)^n*g(n, -2) = A053987(n+1). (End)
As a number triangle:
T(n, k) = i^k*(2*n-k+1)!*(1+(-1)^k)/(2^(n-k+1)*(k+1)!*(n-k)!), where i = sqrt(-1).
T(n, 0) = A001147(n+1).
Showing 1-4 of 4 results.