OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
FORMULA
G.f.: x*(2*x+1)*(x^2+1)/((1+x+x^2)*(x-1)^2). - R. J. Mathar, Aug 24 2011
From Wesley Ivan Hurt, Jun 11 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n > 4.
a(n) = 2*(3*n - 2 - cos(2*n*Pi/3))/3.
a(3k) = 6k-2, a(3k-1) = 6k-3, a(3k-2) = 6k-5. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = (3+2*sqrt(3))*Pi/36 + log(2+sqrt(3))/(2*sqrt(3)) - log(2)/6. - Amiram Eldar, Dec 16 2021
MAPLE
MATHEMATICA
Select[Range[0, 202], MemberQ[{1, 3, 4}, Mod[#, 6]] &] (* and *) Join[{1}, Accumulate[Total /@ CellularAutomaton[65, {1, 1, 0, 0, 1, 0}, 100]]] (* Vladimir Joseph Stephan Orlovsky, Feb 11 2012 *)
LinearRecurrence[{1, 0, 1, -1}, {1, 3, 4, 7}, 80] (* Harvey P. Dale, Aug 21 2021 *)
PROG
(Magma) [n : n in [0..150] | n mod 6 in {1, 3, 4}]; // Vincenzo Librandi, Dec 29 2010
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved