OFFSET
1,2
COMMENTS
a(n) and A340215 follow the same Fibonacci-like recursion with different initial conditions.
a(n+1) is the total number of binary words of length n described in Name (starting with either 0 or 1). For n = 0, a(1) = 1 counts the empty word.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,1,0,0,1).
FORMULA
a(n) = a(n-1) + a(n-2) + a(n-5) with a(1) = 1, a(2) = 2, a(3) = 4, a(4) = 7, a(5) = 12.
G.f.: x*(1 + x + x^2 + x^3 + x^4)/(1 - x - x^2 - x^5). - Stefano Spezia, Jan 01 2021
EXAMPLE
a(5)=12: 10011, 10100, 10101, 10110, 10111, 11001, 11010, 11011, 11100, 11101, 11110, 11111. Note 10011 gets counted at n=5 and 100111 at n=6. Similarly, 11001 gets counted at n=5, 110011 at n=6, and 1100111 at n=7.
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, Jan 01 2021
STATUS
approved