OFFSET
0,3
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0, 3, 0, -3, 0, 1).
FORMULA
a(n) = 3*a(n-2)-3*a(n-4)+a(n-6).
G.f.: x^2*(2+x)/((1-x)^3*(1+x)^3). - R. J. Mathar, Jul 17 2009
a(n) = (3*n^2+4*n-1+(n^2+4*n+1)*(-1)^n)/16. - Luce ETIENNE, Aug 19 2014
MAPLE
MATHEMATICA
LinearRecurrence[{0, 3, 0, -3, 0, 1}, {0, 0, 2, 1, 6, 3}, 60] (* Harvey P. Dale, Jun 01 2012 *)
PROG
(PARI) a(n)=my(q=n\2); q*[2*q+2, q+1][n%2+1]/2 \\ Charles R Greathouse IV, Jun 03 2026
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Paul Curtz, Sep 24 2007
EXTENSIONS
Edited by N. J. A. Sloane, Sep 27 2007
More terms from R. J. Mathar, Oct 26 2007
STATUS
approved
