A215175 a(2*n) = A214297(n), a(2*n+1) = A000290(n).
-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, 144, 42, 169, 45, 196, 56, 225, 63, 256, 72, 289, 77, 324, 90, 361, 99, 400, 110, 441, 117, 484, 132, 529, 143, 576, 156, 625, 165, 676, 182, 729
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1,0,0,0,1,0,-2,0,1).
Programs
-
Mathematica
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 *) 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 *)
Formula
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
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
From Luce ETIENNE, Mar 14 2017: (Start)
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.
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)
Comments