OFFSET
0,8
COMMENTS
Compositions of n into parts 3, 4, and 5. - David Neil McGrath, Jul 28 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Tomislav Došlić, Mate Puljiz, Stjepan Šebek, and Josip Žubrinić, Predators and altruists arriving on jammed Riviera, arXiv:2401.01225 [math.CO], 2024. See p. 14.
Index entries for linear recurrences with constant coefficients, signature (0,0,1,1,1).
FORMULA
a(n) = (1/10)*(2*A001608(n) + 2*A000931(n+2) + (-1)^floor(n/2) - 3(-1)^floor((n-1)/2)). - Ralf Stephan, Jun 09 2005
a(n) = a(n-5) + a(n-4) + a(n-3). - Jon E. Schoenfield, Aug 07 2006
a(2n+3) = A060945(n). - Yasuyuki Kachi, Jul 06 2024
MATHEMATICA
CoefficientList[Series[1 / (1 - x^3 - x^4 - x^5), {x, 0, 50}], x] (* Vincenzo Librandi, Jun 27 2013 *)
LinearRecurrence[{0, 0, 1, 1, 1}, {1, 0, 0, 1, 1}, 50] (* Harvey P. Dale, Oct 03 2020 *)
PROG
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/(1-x^3-x^4-x^5))); /* or */ I:=[1, 0, 0, 1, 1]; [n le 5 select I[n] else Self(n-3)+Self(n-4)+Self(n-5): n in [1..50]]; // Vincenzo Librandi, Jun 27 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved