OFFSET
0,2
COMMENTS
For a guide to related sequences, see A212959.
LINKS
Muniru A Asiru, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).
FORMULA
a(n) + A212968(n) = (n + 1)^3.
a(n) = (n + 1)*(10*n*(n + 2) - 3*(-1)^n + 3)/24.
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6).
G.f.: f(x)/g(x), where f(x) = x*(3 + 4*x + 3*x^2) and g(x) = ((1 - x)^4)(1 + x)^2.
E.g.f.: (exp(x)*(3 + 63*x + 60*x^2 + 10*x^3) - 3*exp(-x)*(1 - x))/24. - Franck Maminirina Ramaharo, Nov 29 2018
MAPLE
A212967:=n->(n+1)*(10*n*(n+2)-3*(-1)^n+3)/24: seq(A212967(n), n=0..100); # Wesley Ivan Hurt, Apr 28 2017
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[w < (Max[w, x, y] - Min[w, x, y]), s = s + 1],
{w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
Map[t[#] &, Range[0, 60]] (* A212967 *)
Accumulate[Accumulate[Table[n + LCM[n, 2], {n, 0, 60}]]] (* Jon Maiga, Nov 28 2018 *)
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {0, 3, 10, 26, 50, 89}, 50] (* Vincenzo Librandi, Nov 29 2018 *)
PROG
(GAP) List([1..45], n->Sum([1..n], k->(10*k*(k-1)+(2*k-1)*(-1)^k+1)/8)); # Muniru A Asiru, Nov 28 2018
(Magma) [(n+1)*(10*n*(n+2) - 3*(-1)^n+3)/24: n in [0..50]]; // Vincenzo Librandi, Nov 29 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 02 2012
STATUS
approved