[go: up one dir, main page]

login
A215936
a(n) = -2*a(n-1) + a(n-2) for n > 2, with a(0) = a(1) = 1, a(2) = 0.
5
1, 1, 0, 1, -2, 5, -12, 29, -70, 169, -408, 985, -2378, 5741, -13860, 33461, -80782, 195025, -470832, 1136689, -2744210, 6625109, -15994428, 38613965, -93222358, 225058681, -543339720, 1311738121, -3166815962, 7645370045, -18457556052, 44560482149
OFFSET
0,5
COMMENTS
BINOMIAL transform is A052955.
Essentially the same as A000129, A069306, A048624, A215928, A077985, and A176981. - R. J. Mathar, Sep 08 2013
LINKS
M. C. Firengiz and A. Dil, Generalized Euler-Seidel method for second order recurrence relations, Notes on Number Theory and Discrete Mathematics, Vol. 20, 2014, No. 4, 21-32.
FORMULA
G.f.: 1 / (1 - x / (1 + x / (1 + x / (1 + x)))) = (1 + 3*x + x^2) / (1 + 2*x - x^2).
a(n + 3) = A077985(n). a(n) * a(n+2) - a(n+1)^2 = -(-1)^n.
a(2*n + 1) = A001653(n). a(2*n + 2) = -A001542(n).
a(n) = Sum_{k=0..n} A147746(n,k)*(-1)^(n-k). - Philippe Deléham, Aug 30 2012
G.f.: 1 + x + x^2/(1-x) - G(0)*x^2 /(2-2*x), where G(k)= 1 + 1/(1 - x*(2*k-1)/(x*(2*k+1) + 1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 10 2013
a(n) = (-1)^n a(1-n) = A000129(-1-n) if n < 0. a(n-2) = 2*a(n-1) + a(n) if n<1 or n>2. - Michael Somos, Mar 19 2019
E.g.f.: exp(-x)*(4*cosh(sqrt(2)*x) + 3*sqrt(2)*sinh(sqrt(2)*x))/2 - 1. - Stefano Spezia, Oct 31 2024
EXAMPLE
G.f. = 1 + x + x^3 - 2*x^4 + 5*x^5 - 12*x^6 + 29*x^7 - 70*x^8 + 169*x^9 - 408*x^10 + ...
MATHEMATICA
CoefficientList[Series[(1 + 3 x + x^2)/(1 + 2 x - x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 09 2013 *)
a[ n_] := With[ {m = If[ n < 1, 1 - n, n], s = If[ n < 1, (-1)^n, 1]}, s SeriesCoefficient[ x (1 + 2 x) / (1 + 2 x - x^2), {x, 0, m}]]; (* Michael Somos, Mar 19 2019 *)
PROG
(PARI) {a(n) = my(m=n, s=1); if(n<1, m=1-n; s=(-1)^n); s * polcoeff( x * (1 + 2*x) / (1 + 2*x - x^2) + x * O(x^m), m)}; /* Michael Somos, Mar 19 2019 */
(Magma) [1, 1] cat [n le 2 select (n-1) else -2*Self(n-1)+Self(n-2): n in [1..35] ]; // Vincenzo Librandi, Sep 09 2013
CROSSREFS
KEYWORD
sign,easy,changed
AUTHOR
Michael Somos, Aug 28 2012
STATUS
approved