OFFSET
0,5
COMMENTS
From Balmer series.
a(n) and differences a(n+1) - a(n):
-1, 0, 0, 1, -3, 4, 2, 9, 3, 16, 6, 25, ...
1, 0, 1, -4, 7, -2, 7, -6, 13, -10, 19, -20, ... = b(n).
b(2*n) = 1, 1, 7, 7, 13, 19, 31, 37, 49, 61, 79, ... = c(n) + 1.
a(n+3) - a(n) = 2, -3, 4, 1, 12, -1, 14, -3, 22, -11, 30, -13, 44, ... = e(n).
e(2*n+1) = -3, 1, -1, -3, -11, -13, -21, -29, -43, -51, -65, -79, ... of signature (2,-1,0,1,-2,1).
Differ. = 4, -2, -2, -8, -2, -8, -8, -14, -8, -14, -14, -20, -14, ... . The different numbers appear four times.
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).
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.
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1,0,0,0,1,0,-2,0,1).
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)
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 *)
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Aug 05 2012
STATUS
approved