OFFSET
0,3
COMMENTS
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
G.f. : (1-2*x+3*x^2)/((1-x^2)(1-x)^2).
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
a(n) = Sum_{k=0..n} (k^2-k+1)*(-1)^(n-k).
a(n) = binomial(n+1, 2) - ceiling((n+1)/2) + 2((n+1) mod 2). - Wesley Ivan Hurt, Mar 08 2014
a(n) = 2*floor(n/2) + ceiling((n-1)^2/2). - M. Ryan Julian Jr., Sep 10 2019
a(n) = A326296(n + 1, n) for n > 0. - Andrew Howroyd, Sep 23 2019
MAPLE
A097063:=n->(1/4) + (3/4)*(-1)^n + (1/2)*n^2; seq(A097063(n), n=0..50); # Wesley Ivan Hurt, Mar 08 2014
MATHEMATICA
Table[(1/4) + (3/4)*(-1)^n + (1/2)*n^2, {n, 0, 50}] (* Wesley Ivan Hurt, Mar 08 2014 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jul 22 2004
STATUS
approved