OFFSET
0,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1, 4, -4, -6, 6, 4, -4, -1, 1).
FORMULA
From Chai Wah Wu, Nov 27 2016: (Start)
a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) - 6*a(n-4) + 6*a(n-5) + 4*a(n-6) - 4*a(n-7) - a(n-8) + a(n-9) for n > 9.
G.f.: x*(-x^8 - 36*x^6 - 416*x^5 - 734*x^4 - 1472*x^3 - 724*x^2 - 416*x - 41)/((x - 1)^5*(x + 1)^4). (End)
MAPLE
seq((2*n+1)^4 - 2*n*(1+n)*(1+3*n+3*n^2-(1+2*n)*(-1)^n), n=1..20); # Mark van Hoeij, May 13 2013
MATHEMATICA
a = -n; b = n; z1 = 20;
t[n_] := t[n] = Flatten[Table[w*z - x*y, {w, a, b}, {x, a, b}, {y, a, b}, {z, a, b}]]
c[n_, k_] := c[n, k] = Count[t[n], k]
u[n_] := Sum[c[n, 2 k], {k, -2*n^2, 2*n^2}]
v[n_] := Sum[c[n, 2 k - 1], {k, -2*n^2, 2*n^2}]
Table[u[n], {n, 1, z1}] (* A211154 *)
Table[v[n], {n, 1, z1}] (* A211155 *)
PROG
(PARI) a(n)=(2*n+1)^4 - 2*n*(1+n)*(1+3*n+3*n^2-(1+2*n)*(-1)^n); \\ Joerg Arndt, May 14 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 05 2012
EXTENSIONS
More terms from Joerg Arndt, May 14 2013
a(0)=1 prepended by Andrew Howroyd, May 05 2020
STATUS
approved