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”).
%I #16 Jun 15 2023 06:54:19
%S 1,1,4,5,9,13,16,25,25,41,36,61,49,85,64,113,81,145,100,181,121,221,
%T 144,265,169,313,196,365,225,421,256,481,289,545,324,613,361,685,400,
%U 761,441,841,484,925,529,1013,576,1105,625,1201,676,1301,729,1405,784
%N Squares (A000290) alternating with centered squares (A001844).
%C 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.
%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,3,0,-3,0,1).
%F a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6).
%F G.f.: x*(-1 - x - x^2 - 2 x^3 - x^5)/(-1 + x^2)^3.
%F 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
%t c[1] = 1; c[2] = 1;
%t c[n_] := If[OddQ[n], c[n - 2] + n, 2 c[n - 1] - n + 1]
%t Table[c[n], {n, 1, 120}]
%Y Cf. A000290, A001844, A123596, A363268, A363269, A363282, A363319.
%K nonn
%O 1,3
%A _Clark Kimberling_, May 24 2023