OFFSET
1,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,1,-1).
FORMULA
G.f.: x^2*(1+x+x^2+x^3+2*x^4) / ( (x^4+x^3+x^2+x+1)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, Sep 17 2015, Jul 16 2013: (Start)
a(n) = floor( 6*(n-1)/5 ).
a(n) = a(n-1) + a(n-5) - a(n-6) for n>6.
a(n) = n - 1 + floor((n-1)/5). (End)
Sum_{n>=2} (-1)^n/a(n) = (9-4*sqrt(3))*Pi/36 + log(2+sqrt(3))/(2*sqrt(3)) + log(2)/6. - Amiram Eldar, Dec 17 2021
MAPLE
A047226 := proc(n)
option remember;
if n <= 6 then
op(n, [0, 1, 2, 3, 4, 6]) ;
else
procname(n-1)+procname(n-5)-procname(n-6) ;
end if;
end proc: # R. J. Mathar, Jul 25 2013
MATHEMATICA
Select[Range[0, 100], MemberQ[{0, 1, 2, 3, 4}, Mod[#, 6]]&] (* Vincenzo Librandi, Jan 06 2013 *)
PROG
(Magma) [n: n in [0..100] | n mod 6 in [0..4]]; // Vincenzo Librandi, Jan 06 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Explicit formula added to definition by M. F. Hasler, Oct 05 2014
STATUS
approved