OFFSET
1,3
COMMENTS
Also, the only numbers that are eligible to be the sum of two 4th powers (A004831). - Cino Hilliard, Nov 23 2003
Nonnegative m such that floor(2*m/5) = 2*floor(m/5). - Bruno Berselli, Dec 09 2015
The sequence lists the indices of the multiples of 5 in A007531. - Bruno Berselli, Jan 05 2018
LINKS
Mohammed Yaseen, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Vincenzo Librandi)
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
FORMULA
a(n+1) = Sum_{k>=0} A030341(n,k)*b(k) with b(0)=1 and b(k)=5*3^(k-1) for k>0. - Philippe Deléham, Oct 22 2011
G.f.: x^2*(1+x+3*x^2)/(1-x)^2/(1+x+x^2). - Colin Barker, Feb 17 2012
a(n) = 5 + a(n-3) for n>3. - Robert Israel, Sep 02 2014
a(n) = floor((5/4)*floor(4*(n-1)/3)). - Bruno Berselli, May 03 2016
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-21-6*cos(2*n*Pi/3)+2*sqrt(3)*sin(2*n*Pi/3))/9.
a(3*k) = 5*k-3, a(3*k-1) = 5*k-4, a(3*k-2) = 5*k-5. (End)
a(n) = n - 1 + 2*floor((n-1)/3). - Bruno Berselli, Feb 06 2017
Sum_{n>=2} (-1)^n/a(n) = sqrt(1-2/sqrt(5))*Pi/5 + 3*log(2)/5. - Amiram Eldar, Dec 10 2021
MAPLE
seq(op([5*i, 5*i+1, 5*i+2]), i=0..100); # Robert Israel, Sep 02 2014
MATHEMATICA
Select[Range[0, 120], MemberQ[{0, 1, 2}, Mod[#, 5]]&] (* Harvey P. Dale, Jan 20 2012 *)
PROG
(PARI) a(n)=n--\3*5+n%3 \\ Charles R Greathouse IV, Oct 22 2011
(PARI) concat(0, Vec(x^2*(1+x+3*x^2)/(1-x)^2/(1+x+x^2) + O(x^100))) \\ Altug Alkan, Dec 09 2015
(PARI) is(n) = n%5 < 3 \\ Felix Fröhlich, Jan 05 2018
(Magma) I:=[0, 1, 2, 5]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..70]]: // Vincenzo Librandi, Apr 25 2012
(Magma) &cat [[5*n, 5*n+1, 5*n+2]: n in [0..30]]; // Bruno Berselli, Dec 09 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved