login
A373554
Number of ternary length-2 squarefree words of length n not containing the subwords 021 or 10.
0
1, 3, 5, 7, 11, 16, 24, 36, 53, 80, 118, 177, 263, 392, 585, 870, 1299, 1933, 2883, 4295, 6400, 9540, 14212, 21185, 31564, 47042, 70101, 104463, 155680, 231985, 345722, 515187, 767749, 1144111, 1704963, 2540784, 3786288, 5642420, 8408397
OFFSET
0,2
FORMULA
a(n) = 2*a(n-2) + a(n-3) - a(n-4).
G.f.: ((1+x)*(1+2*x+x^2-x^3))/(1-2*x^2-x^3+x^4).
EXAMPLE
For n=3 the a(3)=7 solutions are 012, 020, 120, 121, 201, 202, 212.
CROSSREFS
Sequence in context: A116582 A052003 A019449 * A219533 A094615 A245396
KEYWORD
nonn,easy
AUTHOR
Miquel A. Fiol, Jun 09 2024
STATUS
approved