OFFSET
0,5
COMMENTS
The norm of the coefficients in 1/(1 - i*x - i*x^2) is given by A105309.
LINKS
Paul D. Hanna, Table of n, a(n) for n = 0..500
Index entries for linear recurrences with constant coefficients, signature (0,-1,-2,-1).
FORMULA
G.f.: x*(1+x)/(1 + x^2*(1+x)^2).
a(n) = A201837(n-1) + A201837(n-2), where A201837 gives the real part of the coefficients in 1/(1 - i*x - i*x^2).
a(n) = Im((((i + sqrt(4*i-1))^(n+1) - (i - sqrt(4*i-1))^(n+1)))/(2^(n+1)*sqrt(4*i-1))), where i=sqrt(-1). - Daniel Suteu, Apr 20 2018
EXAMPLE
G.f.: A(x) = x + x^2 - x^3 - 3*x^4 - 2*x^5 + 4*x^6 + 9*x^7 + 3*x^8 - 15*x^9 +...
A201837 gives the real part of coefficients in 1/(1 - i*x - i*x^2) and begins: 1, 0, -1, -2, 0, 4, 5, -2, -13, -12, 12, 40, 25, -52, -117, -38, 196, 324,... in which the pairwise sums generate this sequence.
MATHEMATICA
LinearRecurrence[{0, -1, -2, -1}, {0, 1, 1, -1}, 50] (* Harvey P. Dale, Apr 23 2024 *)
PROG
(PARI) {a(n)=imag(polcoeff(1/(1-I*x-I*x^2+x*O(x^n)), n))}
(PARI) {a(n)=polcoeff(x*(1+x)/(1 + x^2 + 2*x^3 + x^4 +x*O(x^n)), n)}
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul D. Hanna, Dec 06 2011
STATUS
approved