OFFSET
0,4
COMMENTS
Number of compositions of n into parts 1, 3, and 6. [Joerg Arndt, Sep 03 2013]
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
K. Edwards, A Pascal-like triangle related to the tribonacci numbers, Fib. Q., 46/47 (2008/2009), 18-25.
Index entries for linear recurrences with constant coefficients, signature (1,0,1,0,0,1).
FORMULA
a(n) = a(n-1) + a(n-3) + a(n-6).
a(n) = Sum_{k=0..floor(n/2)} A157897(n-k, k). - G. C. Greubel, Sep 02 2022
MATHEMATICA
CoefficientList[Series[1/(1-x-x^3-x^6), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 03 2013 *)
PROG
(Magma) I:=[1, 1, 1, 2, 3, 4]; [n le 6 select I[n] else Self(n-1)+Self(n-3)+Self(n-6): n in [1..40]]; // Vincenzo Librandi, Sep 03 2013
(SageMath)
def A120415_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( 1/(1-x-x^3-x^6) ).list()
A120415_list(40) # G. C. Greubel, Sep 02 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jon E. Schoenfield, Aug 27 2006
STATUS
approved