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

A007060 Number of ways n married couples can sit in a row without any spouses next to each other.

Original entry on oeis.org

1, 0, 8, 240, 13824, 1263360, 168422400, 30865121280, 7445355724800, 2287168006717440, 871804170613555200, 403779880746418176000, 223346806774106790297600, 145427383048755178635264000, 110105698060190464791596236800, 95914116314126658718742347776000, 95252504853751428295192341381120000
Offset: 0

Views

Author

David Roberts Keeney (David.Roberts.Keeney(AT)directory.Reed.edu)

Keywords

Comments

Limit_{n->oo} a(n)/(2n)! = 1/e.
Also the number of (directed) Hamiltonian paths of the n-cocktail party graph. - Eric W. Weisstein, Dec 16 2013
Also the number of ways to label the cells of a 2 X n grid such that no vertically adjacent cells have adjacent labels. - Sela Fried, May 29 2023

Examples

			For n = 2, the a(2) = 8 solutions for the couples {1,2} and {3,4} are {1324, 1423, 2314, 2413, 3142, 3241, 4132, 4231}.
		

Crossrefs

Programs

  • Maple
    seq(add((-1)^i*binomial(n, i)*2^i*(2*n-i)!, i=0..n),n=0..20);
  • Mathematica
    Table[Sum[(-1)^i Binomial[n,i] (2 n - i)! 2^i, {i, 0, n}], {n, 0, 20}]
    Table[(2 n)! Hypergeometric1F1[-n, -2 n, -2], {n, 0, 20}]
  • PARI
    a(n)=sum(k=0, n, binomial(n, k)*(-1)^(n-k)*(n+k)!*2^(n-k)) \\ Charles R Greathouse IV, May 11 2016
    
  • Python
    from sympy import binomial, subfactorial
    def a(n): return sum([(-1)**(n - k)*binomial(n, k)*subfactorial(2*k) for k in range(n + 1)]) # Indranil Ghosh, Apr 28 2017

Formula

a(n) = (Pi*BesselI(n+1/2,1)*(-1)^n+BesselK(n+1/2,1))*exp(-1)*(2/Pi)^(1/2)*2^n*n!. - Mark van Hoeij, Nov 12 2009
a(n) = (-1)^n*2^n*n!*A000806(n), n>0. - Vladeta Jovovic, Nov 19 2009
a(n) = n!*hypergeom([-n, n+1],[],1/2)*(-2)^n. - Mark van Hoeij, Nov 13 2009
a(n) = 2^n * A114938(n). - Toby Gottfried, Nov 22 2010
a(n) = 2*n((2*n-1)*a(n-1) + (2*n-2)*a(n-2)), n > 1. - Aaron Meyerowitz, May 14 2014
From Peter Bala, Mar 06 2015: (Start)
a(n) = Sum_{k = 0..n} (-1)^(n-k)*binomial(n,k)*A000166(2*k).
For n >= 1, Integral_{x = 0..1} (x^2 - 1)^n*exp(x) dx = a(n)*e - A177840(n). Hence lim_{n->oo} A177840(n)/a(n) = e. (End)
a(n) ~ sqrt(Pi) * 2^(2*n+1) * n^(2*n + 1/2) / exp(2*n+1). - Vaclav Kotesovec, Mar 09 2016

Extensions

More terms from Michel ten Voorde, Apr 11 2001

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

A177840 Consider the n pairs (1,2), ..., (2n-1,2n); a(n) is the number of permutations of [ 2n ] with no two fixed points for any pair.

Original entry on oeis.org

1, 1, 21, 653, 37577, 3434169, 457819549, 83900098309, 20238575173137, 6217167231292913, 2369809434953636261, 1097587512530348834301, 607119566298408076479961, 395312612701784187384578473, 299298318246814086742418737197, 260721599469397754183307347278709
Offset: 0

Views

Author

Paul Weisenhorn, May 14 2010

Keywords

Comments

Inverse binomial transform of (2n)!. - Peter Luschny, May 31 2014
Also, the number of permutations of [2n] with no two cycle (2i-1,2i) for any pair. The number of permutation where no such pair is exchanged or fixed pointwise is A116218. - Aaron Meyerowitz, Jul 22 2023

Examples

			a(2) = 21, because there are 4! = 24 permutations of [ 4 ], only 3 of them have pairs with 2 fixed points: [1,2,3,4], [1,2,4,3], [2,1,3,4].
a(3) = A(3,0) = 653, A(3,1) = 63, A(3,2) = 3, A(3,4) = 1, sum = 720 = 6!.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember;
          `if`(n<2, 1-n, (n-1) *(f(n-1)+f(n-2)))
        end:
    a:= n-> add(binomial(n,j) *2^j *f(2*n-j), j=0..n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Sep 06 2011
  • Mathematica
    f[n_] := f[n] = If[n<2, 1-n, (n-1)*(f[n-1]+f[n-2])]; a[n_] := Sum[Binomial[ n, j]*2^j*f[2*n-j], {j, 0, n}]; Table[a[n], {n, 1, 20}] (* Jean-François Alcover, Feb 25 2017, after Alois P. Heinz *)

Formula

a(n) = Sum_{j=0..n} C(n,j) * 2^j * f(2*n-j), where f(n) is the number of permutations of [n] with no fixed-points (A000166).
a(n) = A(n,0), with A(n,s) = number of permutations of [2n] with exactly s pairs with 2 fixed points:
A(n,s) = (n!/s!) * Sum_{j=0..n-s} 1/(j!*(n-s-j)!) * 2^j * f(2*(n-s)-j).
A(n,n) = 1, A(n,n-1) = n, A(n,n-2) = 21*n!/(2*(n-2)!).
Sum_{s=0..n} A(n,s) = (2*n)!.
a(n) = Sum_{j=0..n} C(n,j)*(2*n-2*j)!*(-1)^j. - Tani Akinari, Feb 01 2015
A(n,s) = Sum_{j=s..n} C(n,j)*C(j,s)*(2*n-2*j)!*(-1)^(j-s). - Tani Akinari, Feb 01 2015
From Peter Bala, Mar 07 2015: (Start)
a(n) = Integral_{x = 0..oo} (x^2 - 1)^n*exp(-x) dx.
For n >= 1, Integral_{x = 0..1} (x^2 - 1)^n*exp(x) dx = A007060(n)*e - a(n). Hence lim_{n->oo} a(n)/A007060(n) = e.
O.g.f. with a(0) := 1: Sum_{k >= 0} (2*k)!*x^k/(1 + x)^(k + 1) = 1 + x + 21*x^2 + 653*x^3 + ....
a(n) = 2*n*(2*n - 1)*a(n-1) + 4*n*(n - 1)*a(n-2) + (-1)^n, with initial conditions a(0) = 1, a(1) = 1.
Homogeneous recurrence: a(n) = (4*n^2 - 2*n - 1)*a(n-1) + 2*(n - 1)*(4*n - 3)*a(n-2) + 4*(n - 1)*(n - 2)*a(n-3), with initial conditions a(0) = 1, a(1) = 1 and a(2) = 21. Cf. A064570. (End)
a(n) ~ sqrt(Pi) * 2^(2*n+1) * n^(2*n + 1/2) / exp(2*n). - Vaclav Kotesovec, Mar 10 2015
a(n) = (2*n)!*hypergeom([],[1/2-n],1/4)+(-1)^n*(1-hypergeom([1],[1/2,n+1],1/4)). - Peter Luschny, Mar 15 2015

Extensions

b-file changed to a-file by N. J. A. Sloane, Oct 05 2010
Edited by Alois P. Heinz, Sep 06 2011
a(0)=1 prepended by Alois P. Heinz, Jul 23 2023

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).

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

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.

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

Original entry on oeis.org

2, 1, 1, 4, 27, 239, 2602, 33587, 501203, 8486864, 160749213, 3367246609, 77285922794, 1928780823241, 51999796304713, 1506065312013436, 46636024876111803, 1537482755599676063, 53765260421112550402, 1987777152825564688811, 77469543699775910313227
Offset: 0

Author

G. C. Greubel, May 10 2015

Keywords

Crossrefs

Programs

  • Magma
    [n le 2 select 3-n else (2*n-3)*Self(n-1)-Self(n-2): n in [1..50]]; // Vincenzo Librandi, May 12 2015
  • Mathematica
    RecurrenceTable[{a[0] == 2, a[1] == 1, a[n] == -a[n - 2] + (2 n - 1) a[n - 1]}, a, {n, 30}]

Formula

a(n) = 2*A053983(n) - A053984(n).
a(n) = (SBY(0,1) - 2*SBY(1,1))*SBJ(n,1) - (SBJ(0,1) - 2*SBJ(1,1))*SBY(n,1), where SBJ and SBY are the spherical Bessel functions of first and second kind, respectively.
E.g.f.: (2*cos(1-sqrt(1-2*x)) - sin(1-sqrt(1-2*x)))/sqrt(1-2*x).
Sum_{n=0..infinity} a(n-1) x^n/n! = cos(1-sqrt(1-2*x)) + 2*sin(1-sqrt(1-2*x)), where a(-1)=1, a(0)=2, a(1)=1.
a(n) ~ (2*cos(1)-sin(1)) * 2^(n+1/2) * n^n / exp(n). - Vaclav Kotesovec, May 20 2015
Showing 1-8 of 8 results.