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,0,1,-1).
FORMULA
G.f.: x^2*(1+x+x^2+x^3+x^4+2*x^5) / ( (1+x)*(1+x+x^2)*(x^2-x+1)*(x-1)^2 ). - R. J. Mathar, Dec 04 2011
From Wesley Ivan Hurt, Jun 15 2016: (Start)
a(n) = a(n-1) + a(n-6) - a(n-7) for n>7.
a(n) = (42*n-57-3*cos(Pi*n)-4*sqrt(3)*cos((4*n+1)*Pi/6)-12*sin((1-2*n)*Pi/6))/36.
a(6k) = 7k-2, a(6k-1) = 7k-3, a(6k-2) = 7k-4, a(6k-3) = 7k-5, a(6k-4) = 7k-6, a(6k-5) = 7k-7. (End)
MAPLE
A047368:=n->(42*n-57-3*cos(Pi*n)-4*sqrt(3)*cos((4*n+1)*Pi/6)-12*sin((1-2*n)*Pi/6))/36: seq(A047368(n), n=1..100); # Wesley Ivan Hurt, Jun 15 2016
MATHEMATICA
Select[Range[0, 100], MemberQ[{0, 1, 2, 3, 4, 5}, Mod[#, 7]] &] (* Wesley Ivan Hurt, Jun 15 2016 *)
LinearRecurrence[{1, 0, 0, 0, 0, 1, -1}, {0, 1, 2, 3, 4, 5, 7}, 100] (* Vincenzo Librandi, Jun 16 2016 *)
PROG
(PARI) a(n)=(n-1)*7\6 \\ M. F. Hasler, Oct 05 2014
(Magma) [n : n in [0..100] | n mod 7 in [0..5]]; // Wesley Ivan Hurt, Jun 15 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Crossrefs and explicit formula in name added by M. F. Hasler, Oct 05 2014
STATUS
approved