OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-2,2,-1).
FORMULA
G.f.: x^2*(2-x+2*x^2-x^3+2*x^4) / ( (1+x+x^2)*(x^2-x+1)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, Jun 15 2016: (Start)
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-2*a(n-4)+2*a(n-5)-a(n-6) for n>6.
a(n) = (12*n-12-sqrt(3)*cos((1-4*n)*Pi/6)-3*sqrt(3)*cos((1+2*n)*Pi/6))/9.
a(6k) = 8k-2, a(6k-1) = 8k-3, a(6k-2) = 8k-4, a(6k-3) = 8k-5, a(6k-4) = 8k-6, a(6k-5) = 8k-8. (End)
Sum_{n>=2} (-1)^n/a(n) = sqrt(2)*log(3+2*sqrt(2))/8. - Amiram Eldar, Dec 27 2021
MAPLE
A047424:=n->(12*n-12-sqrt(3)*cos((1-4*n)*Pi/6)-3*sqrt(3)*cos((1+2*n)*Pi/6))/9: seq(A047424(n), n=1..100); # Wesley Ivan Hurt, Jun 15 2016
MATHEMATICA
Select[Range[0, 100], MemberQ[{0, 2, 3, 4, 5, 6}, Mod[#, 8]]&] (* Harvey P. Dale, Mar 21 2011 *)
PROG
(Magma) [n : n in [0..100] | n mod 8 in [0] cat [2..6]]; // Wesley Ivan Hurt, Jun 15 2016
(PARI) my(x='x+O('x^50)); concat([0], Vec(x^2*(2 -x +2*x^2 -x^3 +2*x^4 )/((1 + x+x^2)*(x^2-x+1)*(x-1)^2))) \\ G. C. Greubel, Oct 29 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved