a(n) is the maximum value obtainable by partitioning the set {x in the natural numbers | 0 <= x <= 2n+1} into pairs, taking the product of all such pairs, and taking the sum of all such products. - Thomas Anton, Oct 20 2020
Accumulate[Times@@@Partition[Range[0, 81], 2]] (* or *) LinearRecurrence[ {4, -6, 4, -1}, {0, 6, 26, 68}, 40] (* Harvey P. Dale, Jun 20 2013 *)
a[ n_] := n (n - 1) (4 n + 1)/3; (* Michael Somos, Oct 15 2015 *)
a[ n_] := If[ n >= 0, Length @ FindInstance[ 1 - n <= x <= y <= z <= n - 1 && x - 2 y + z != 0, {x, y, z}, Integers, 10^9], -(Length @ FindInstance[ n <= x < y <= z <= -n && x - 2 y + z != 0, {x, y, z}, Integers, 10^9] + n)]; (* Michael Somos, Oct 15 2015 *)