OFFSET
0,2
COMMENTS
For a guide to related sequences, see A211795.
Sum of odd integers between 1 and (n+1)^2. - Réjean Labrie, Jan 14 2014
LINKS
Muniru A Asiru, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (2,2,-6,0,6,-2,-2,1).
FORMULA
a(n) = (A000982(n+1))^2.
a(n) = 2*a(n-1) + 2*a(n-2) - 6*a(n-3) + 6*a(n-5) - 2*a(n-6) - 2*a(n-7) + a(n-8).
G.f.: f(x)/g(x), where f(x) = -1 - 2*x - 15*x^2 - 12*x^3 - 15*x^4 - 2*x^5 - x^6 and g(x) = ((-1+x)^5)*(1+x)^3.
MAPLE
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[Mod[w - x, 2] == Mod[x - y, 2] == Mod[y - z, 2], s = s + 1],
{w, 0, n}, {x, 0, n}, {y, 0, n}, {z, 0, n}]; s)]];
m = Map[t[#] &, Range[0, 40]] (* this sequence *)
Sqrt[m] (* A000982 except for offset *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 30 2012
STATUS
approved