OFFSET
0,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
G.f.: (2 - x - 2*x^2 + 3*x^3)/(1 - 2*x + 2*x^3 - x^4) = (2 - x - 2*x^2 + 3*x^3)/((1 - x)^2 * (1 - x^2)).
a(n) = a(-n) for all n in Z. a(n) = A105343(n) if n>=1.
EXAMPLE
G.f. = 2 + 3*x + 4*x^2 + 7*x^3 + 10*x^4 + 15*x^5 + 20*x^6 + 27*x^7 + ...
MATHEMATICA
Table[(2 n^2+9-(-1)^n)/4, {n, 0, 60}] (* or *) LinearRecurrence[{2, 0, -2, 1}, {2, 3, 4, 7}, 60] (* Harvey P. Dale, Apr 19 2023 *)
PROG
(PARI) {a(n) = (2*n^2 + 9 - (-1)^n)/4};
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael Somos, Dec 11 2019
EXTENSIONS
Previous Mathematica program adjusted by Harvey P. Dale, Apr 19 2023
STATUS
approved