OFFSET
3,1
LINKS
Todd Silvestri, Table of n, a(n) for n = 3..1002
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
FORMULA
a(2k) = (k-1)*(k+1), a(2k+1) = 2k*(k+1).
a(n) = 3*a(n-2)-3*a(n-4)+a(n-6). G.f.: x^3*(x^3-3*x-4) / ((x-1)^3*(x+1)^3). - Colin Barker, Sep 15 2014
a(n) = (3*(n^2-2)+(-1)^(n+1)*(n^2+2))/8. - Todd Silvestri, Dec 16 2014
E.g.f.: 1 + (3*x^2/8 + 3*x/8 - 3/4)*exp(x) + (-x^2/8 + x/8 - 1/4)*exp(-x). - Robert Israel, Dec 16 2014
MAPLE
seq(`if`(n::even, (n/2-1)*(n/2+1), (n-1)*(n+1)/2), n=3..100); # Robert Israel, Dec 16 2014
MATHEMATICA
a[n_Integer/; n>=3]:=(3 (n^2-2)+(-1)^(n+1) (n^2+2))/8 (* Todd Silvestri, Dec 16 2014 *)
PROG
(PARI) Vec(x^3*(x^3-3*x-4)/((x-1)^3*(x+1)^3) + O(x^100)) \\ Colin Barker, Sep 15 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Henry Bottomley, May 22 2000
STATUS
approved