OFFSET
1,2
COMMENTS
Also numbers k such that k*(k+1)*(k+3) is divisible by 5. - Bruno Berselli, Dec 28 2017
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
FORMULA
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
G.f.: x^2*(2 + 2*x + x^2)/((1 - x)^2*(1 + x + x^2)). - Bruno Berselli, Mar 31 2011
a(n) = floor((5*n-3)/3). - Gary Detlefs, May 14 2011
a(n) = n + ceiling(2*(n-1)/3) - 1. - Arkadiusz Wesolowski, Sep 18 2012
From Wesley Ivan Hurt, Jun 14 2016: (Start)
a(n) = (15*n - 12 + 3*cos(2*n*Pi/3) - sqrt(3)*sin(2*n*Pi/3))/9.
a(3*k) = 5*k-1, a(3*k-1) = 5*k-3, a(3*k-2) = 5*k-5. (End)
Sum_{n>=2} (-1)^n/a(n) = log(2)/5 + arccosh(7/2)/(2*sqrt(5)) - sqrt(1-2*sqrt(5)/5)*Pi/5. - Amiram Eldar, Dec 10 2021
MAPLE
MATHEMATICA
Select[Range[0, 200], MemberQ[{0, 2, 4}, Mod[#, 5]] &] (* Vladimir Joseph Stephan Orlovsky, Feb 12 2012 *)
PROG
(Magma) [n : n in [0..140] | n mod 5 in [0, 2, 4]]; // Vincenzo Librandi, Mar 31 2011
(Magma) &cat[[n, n+2, n+4]: n in [0..90 by 5]]; // Bruno Berselli, Mar 31 2011
(PARI) a(n)=n\3*5+[-1, 0, 2][n%3+1] \\ Charles R Greathouse IV, Mar 29 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved