login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A242227
a(n) = (2*n-1) * a(n-1) - a(n-2), a(0) = 1, a(1) = 2.
1
1, 2, 5, 23, 156, 1381, 15035, 194074, 2896075, 49039201, 928848744, 19456784423, 446577192985, 11144973040202, 300467694892469, 8702418178841399, 269474495849190900, 8883955944844458301, 310668983573706849635, 11485868436282308978194
OFFSET
0,2
LINKS
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.
EXAMPLE
G.f. = 1 + 2*x + 5*x^2 + 23*x^3 + 156*x^4 + 1381*x^5 + 15035*x^6 + ...
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 *)
PROG
(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))};
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael Somos, May 08 2014
STATUS
approved