OFFSET
0,4
COMMENTS
Number of compositions of n into parts 1, 3, 5, and 7. - David Neil McGrath, Aug 18 2014
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..4891
Milan Janjic, Binomial Coefficients and Enumeration of Restricted Words, Journal of Integer Sequences, 2016, Vol 19, #16.7.3.
Sergey Kirgizov, Q-bonacci words and numbers, arXiv:2201.00782 [math.CO], 2022.
Index entries for linear recurrences with constant coefficients, signature (1,0,1,0,1,0,1).
FORMULA
a(n) = a(n-1) + a(n-3) + a(n-5) + a(n-7).
MAPLE
a:= proc() option remember;
if n=0 then 1;
elif n<=7 then combinat[fibonacci](n);
else a(n-1) + a(n-3) + a(n-5) + a(n-7);
end if; end proc;
seq(a(n), n=0..50); # modified by G. C. Greubel, Jul 21 2023
MATHEMATICA
CoefficientList[Series[1/(1-x-x^3-x^5-x^7), {x, 0, 50}], x]
PROG
(PARI) Vec( 1/(1-x-x^3-x^5-x^7)+O(x^66) ) \\ Joerg Arndt, Aug 19 2014
(Magma) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!( 1/(1-x-x^3-x^5-x^7) )); // G. C. Greubel, Jul 21 2023
(SageMath)
@CachedFunction
def a(n): # a = A117760
if n<8: return fibonacci(n) + int(n==0)
else: return a(n-1) + a(n-3) + a(n-5) + a(n-7)
[a(n) for n in range(51)] # G. C. Greubel, Jul 21 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Apr 14 2006
EXTENSIONS
Edited and extended by N. J. A. Sloane, Apr 20 2006
STATUS
approved