OFFSET
1,1
COMMENTS
For n>0: a(n) = greatest m<=2*(n+1) coprime to a(n-1). - Reinhard Zumkeller, Oct 31 2005
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
FORMULA
G.f.: x*(x+2)*(1+x^2) / ((1+x+x^2)*(x-1)^2). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, Jun 10 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = (6*n-2-cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/3.
a(3k) = 6k-1, a(3k-1) = 6k-3, a(3k-2) = 6k-4. (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
A047254:=n->(6*n-2-cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/3: seq(A047254(n), n=1..100); # Wesley Ivan Hurt, Jun 10 2016
MATHEMATICA
Select[Range[0, 150], MemberQ[{2, 3, 5}, Mod[#, 6]] &] (* Wesley Ivan Hurt, Jun 10 2016 *)
PROG
(Magma) [n: n in [0..150] | n mod 6 in {2, 3, 5} ]; // Vincenzo Librandi, Dec 25 2010
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved