Tom K. answered 03/14/21
Knowledgeable and Friendly Math and Statistics Tutor
a0 = 1
a1 = 1
an = an-1 + an-2 n = 2,3,4
an = an-1 + an-2 +an-5 n >= 5
For n = 10, an = 128
The counting solution is the coefficient of xn in ∑k=0∞ (x + x2 + x5)k , or
fn(0)/n! , where f(x) = 1/(1 - x - x2 - x5)