OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
From R. J. Mathar, Mar 21 2010: (Start)
G.f.: x*(2 + x + 2*x^2 + 2*x^3 + 4*x^4)/ ((1+x)*(x^2+1)*(x-1)^2).
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5. (End)
a(n) = (22*n - 21 - 5*i^(2*n) - (3-5*i)*i^(-n) - (3+5*i)*i^n)/8 where i = sqrt(-1). - Wesley Ivan Hurt, Jun 07 2016
E.g.f.: (1/4)*(16 + (11*x -13)*cosh(x) + (11*x - 8)*sinh(x) - 3*cos(x) + 5*sin(x)). - G. C. Greubel, Jul 23 2016
MAPLE
A168484:=n->(22*n-21-5*I^(2*n)-(3-5*I)*I^(-n)-(3+5*I)*I^n)/8: seq(A168484(n), n=1..100); # Wesley Ivan Hurt, Jun 07 2016
MATHEMATICA
CoefficientList[Series[(2 + x + 2 x^2 + 2 x^3 + 4 x^4)/((1 + x) (x^2+1) (x-1)^2), {x, 0, 100}], x] (* Vincenzo Librandi, Sep 24 2014 *)
Select[Range[168], MemberQ[{2, 3, 5, 7}, Mod[#, 11]]&] (* Ray Chandler, Jul 07 2015 *)
LinearRecurrence[{1, 0, 0, 1, -1}, {2, 3, 5, 7, 13}, 62] (* Ray Chandler, Jul 07 2015 *)
PROG
(Magma) [n : n in [0..200] | n mod 11 in [2, 3, 5, 7]]; // Wesley Ivan Hurt, Jun 07 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Nov 28 2009
STATUS
approved