login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A212893
Number of quadruples (w,x,y,z) with all terms in {0,...,n} such that w-x, x-y, and y-z all have the same parity.
2
1, 4, 25, 64, 169, 324, 625, 1024, 1681, 2500, 3721, 5184, 7225, 9604, 12769, 16384, 21025, 26244, 32761, 40000, 48841, 58564, 70225, 82944, 97969, 114244, 133225, 153664, 177241, 202500, 231361, 262144, 297025, 334084, 375769
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
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
A212893 := n->ceil((n+1)^2/2)^2; seq(A212893(k), k=1..100); # Wesley Ivan Hurt, Jun 14 2013
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
Sequence in context: A016790 A065733 A368245 * A376483 A302324 A303017
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 30 2012
STATUS
approved