|
|
A363269
|
|
Positive squares (A000290) alternating with positive square pyramidal numbers (A000330).
|
|
4
|
|
|
1, 1, 4, 5, 9, 14, 16, 30, 25, 55, 36, 91, 49, 140, 64, 204, 81, 285, 100, 385, 121, 506, 144, 650, 169, 819, 196, 1015, 225, 1240, 256, 1496, 289, 1785, 324, 2109, 361, 2470, 400, 2870, 441, 3311, 484, 3795, 529, 4324, 576, 4900, 625, 5525, 676, 6201, 729
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 4*a(n-2) - 6*a(n-4) + 4*a(n-6) - a(n-8).
G.f.: x*(1 + x + x^3 - x^4)/(-1 + x^2)^4.
E.g.f.: ((18*x + 6*x^2)*cosh(x) + (6 + 6*x + 6*x^2 + x^3)*sinh(x))/24. - Stefano Spezia, Jun 10 2023
48*a(n) = (n+1) * (n^2 +(-1)^n*n^2 -4*(-1)^n*n +8*n -6*(-1)^n +6). - R. J. Mathar, Jun 22 2023
|
|
MATHEMATICA
|
c[1] = 1; c[2] = 1;
c[n_] := If[OddQ[n], c[n - 2] + n, c[n - 2] + c[n - 1]]
Table[c[n], {n, 1, 120}]
|
|
PROG
|
(PARI) a(n) = if(n%2, (n+1)^2/4, n*(n+1)*(n+2)/24); \\ Kevin Ryde, Jun 10 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|