%I #20 Oct 13 2022 15:00:32
%S -1,0,0,1,-3,4,2,9,3,16,6,25,5,36,12,49,15,64,20,81,21,100,30,121,35,
%T 144,42,169,45,196,56,225,63,256,72,289,77,324,90,361,99,400,110,441,
%U 117,484,132,529,143,576,156,625,165,676,182,729
%N a(2*n) = A214297(n), a(2*n+1) = A000290(n).
%C From Balmer series.
%C a(n) and differences a(n+1) - a(n):
%C -1, 0, 0, 1, -3, 4, 2, 9, 3, 16, 6, 25, ...
%C 1, 0, 1, -4, 7, -2, 7, -6, 13, -10, 19, -20, ... = b(n).
%C b(2*n) = 1, 1, 7, 7, 13, 19, 31, 37, 49, 61, 79, ... = c(n) + 1.
%C c(n) = 0, 0, 6, 6, 12, 18, 30, 36, 48, 60, 78, ... = A005563(n-1) - A214297(n) = 6*A001971(n).
%C a(n+3) - a(n) = 2, -3, 4, 1, 12, -1, 14, -3, 22, -11, 30, -13, 44, ... = e(n).
%C e(2*n+1) = -3, 1, -1, -3, -11, -13, -21, -29, -43, -51, -65, -79, ... of signature (2,-1,0,1,-2,1).
%C Differ. = 4, -2, -2, -8, -2, -8, -8, -14, -8, -14, -14, -20, -14, ... . The different numbers appear four times.
%C Differ. = -6, 0, -6, 6, -6, 0, -6, 6, -6, 0, -6, 6, -6, ... . Of period 4. Like c(n+2) - 2*c(n+1) - c(n).
%C Note that a(2*n) + a(2*n+1) = -1, 1, 1, 11, 19, 31, 41, 61, ... increases after the last 1 despite 6 is before 5.
%H <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1,0,0,0,1,0,-2,0,1).
%F G.f. ( 1-x^3+4*x^4-2*x^5-8*x^6-2*x^7+3*x^8-2*x^9-x^11-2*x^2 ) / ( (x^2+1)*(x^4+1)*(x-1)^3*(1+x)^3 ). - _R. J. Mathar_, Aug 07 2012
%F a(n) = 2*a(n-2) - a(n-4) + a(n-8) - 2*a(n-10) + a(n-12). - _R. J. Mathar_, Aug 07 2012
%F From _Luce ETIENNE_, Mar 14 2017: (Start)
%F a(n) = ((5*n^2-8*n-18-(3*n^2-8*n+26)*(-1)^n-18*((-1)^((2*n-1+(-1)^n)/4)+(-1)^((2*n+1-(-1)^n)/4)))+12*(1+(-1)^n+(-1)^((2*n+1-(-1)^n)/4)+(-1)^((2*n-1+(-1)^n)/4))*(-1)^floor(n/4))/32.
%F a(n) = (5*n^2-8*n-18-(3*n^2-8*n+26)*cos(n*Pi)-36*cos(n*Pi/2)+12*(1+cos(n*Pi)+2*cos(n*Pi/2))*(cos((2*n-1+(-1)^n)*Pi/8)+sin((2*n-1+(-1)^n)*Pi)/8)))/32. (End)
%t Table[If[EvenQ@ n, (2 #^2 - 11 - 9 (-1)^# + 6 ((-1)^((2 # + 1 - (-1)^#)/4) + (-1)^((2 # - 1 + (-1)^#)/4)))/8 &[n/2], ((n - 1)/2)^2], {n, 0, 55}] (* or *)
%t CoefficientList[Series[(1 - x^3 + 4 x^4 - 2 x^5 - 8 x^6 - 2 x^7 + 3 x^8 - 2 x^9 - x^11 - 2 x^2)/((x^2 + 1) (x^4 + 1) (x - 1)^3*(1 + x)^3), {x, 0, 69}], x] (* _Michael De Vlieger_, Mar 24 2017 *)
%K sign,easy
%O 0,5
%A _Paul Curtz_, Aug 05 2012