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”).

A363267
Squares (A000290) alternating with centered squares (A001844).
5
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,3
COMMENTS
This is a linear recurrence sequence. If the terms are arranged in nondecreasing order, the result, A363319, is linearly recurrent. If the terms are arranged in increasing order, so that there are no duplicates, the result, A363282, is not linearly recurrent.
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
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}]
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 24 2023
STATUS
approved