OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
FORMULA
G.f.: x^2*(3+x+x^2) / ( (1+x+x^2)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, Jun 14 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = (15*n-9-4*sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 5k-1, a(3k-1) = 5k-2, a(3k-2) = 5k-5. (End)
Sum_{n>=2} (-1)^n/a(n) = 3*log(2)/5 - sqrt(1-2/sqrt(5))*Pi/5. - Amiram Eldar, Jan 01 2022
MAPLE
A047205:=n->(15*n-9-4*sqrt(3)*sin(2*n*Pi/3))/9: seq(A047205(n), n=1..100); # Wesley Ivan Hurt, Jun 14 2016
MATHEMATICA
Select[Range[0, 200], MemberQ[{0, 3, 4}, Mod[#, 5]] &] (* Vladimir Joseph Stephan Orlovsky, Feb 12 2012 *)
PROG
(Magma) [ n : n in [0..150] | n mod 5 in [0, 3, 4] ]; // Vincenzo Librandi, Mar 31 2011
(PARI) a(n)=n\3*5+[-1, 0, 3][n%3+1] \\ Charles R Greathouse IV, Dec 22 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved