OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..5098
Index entries for linear recurrences with constant coefficients, signature (1, 0, 1, 0, 1).
FORMULA
G.f.: x*(-3 + 2*x + 5x^2 + 7*x^3 + 8*x^4)/(1 - x - x^3 - x^5). - Philippe Deléham, Oct 20 2006
EXAMPLE
-3 + 4 + 15 = 16
-1 + 8 + 16 = 23
4 + 15 + 23 = 42
MAPLE
a[1]:=-3: a[2]:=-1: a[3]:=4: a[4]:=8: a[5]:=15: for n from 6 to 45 do a[n]:=a[n-1]+a[n-3]+a[n-5] od: seq(a[n], n=1..45); # Emeric Deutsch, Oct 23 2006
MATHEMATICA
LinearRecurrence[{1, 0, 1, 0, 1}, {-3, -1, 4, 8, 15}, 50] (* Harvey P. Dale, Apr 22 2013 *)
PROG
(PARI) first(n) = my(res = vector(n)); res[1] = -3; res[2] = -1; res[3] = 4; res[4] = 8; res[5] = 15; for(i = 6, n, res[i] = res[i-1] + res[i-3] + res[i-5]); res \\ Iain Fox, Oct 23 2017
CROSSREFS
KEYWORD
sign
AUTHOR
Jian Tang (jian.tang(AT)gmail.com), Oct 19 2006
EXTENSIONS
More terms from Emeric Deutsch, Oct 23 2006
STATUS
approved