OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
a(n) = floor((7n-6)/4). [Gary Detlefs, Mar 06 2010]
G.f.: x^2*(2+x+2*x^2+2*x^3) / ( (1+x)*(x^2+1)*(x-1)^2 ). - R. J. Mathar, Dec 04 2011
From Wesley Ivan Hurt, Jun 04 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = i^(-n)*((14*n-15)*i^n+i-1-(1+i)*i^(2*n)+i^(-n))/8 where i=sqrt(-1).
E.g.f.: (8 + sin(x) - cos(x) + (7*x - 8)*sinh(x) + 7*(x - 1)*cosh(x))/4. - Ilya Gutkovskiy, Jun 04 2016
MAPLE
seq(floor((7*n-6)/4), n=1..56); # [Gary Detlefs, Mar 06 2010]
MATHEMATICA
Table[I^(-n)*((14n-15)*I^n+I-1-(1+I)*I^(2n)+I^(-n))/8, {n, 80}] (* Wesley Ivan Hurt, Jun 04 2016 *)
LinearRecurrence[{1, 0, 0, 1, -1}, {0, 2, 3, 5, 7}, 70] (* Harvey P. Dale, Oct 24 2018 *)
PROG
(Magma) [n : n in [0..150] | n mod 7 in [0, 2, 3, 5]]; // Wesley Ivan Hurt, Jun 04 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved