A363267 Squares (A000290) alternating with centered squares (A001844).
1, 1, 4, 5, 9, 13, 16, 25, 25, 41, 36, 61, 49, 85, 64, 113, 81, 145, 100, 181, 121, 221, 144, 265, 169, 313, 196, 365, 225, 421, 256, 481, 289, 545, 324, 613, 361, 685, 400, 761, 441, 841, 484, 925, 529, 1013, 576, 1105, 625, 1201, 676, 1301, 729, 1405, 784
Offset: 1
Keywords
Links
- Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
Programs
-
Mathematica
c[1] = 1; c[2] = 1; c[n_] := If[OddQ[n], c[n - 2] + n, 2 c[n - 1] - n + 1] Table[c[n], {n, 1, 120}]
Formula
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6).
G.f.: x*(-1 - x - x^2 - 2 x^3 - x^5)/(-1 + x^2)^3.
a(n+1) = n/2+3*n^2/8+3/4+(-1)^n*(1/4+n/2-n^2/8). - R. J. Mathar, Jun 15 2023
Comments