login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of ternary length-2 squarefree words of length n not containing the subwords 021 or 10.
0

%I #9 Jul 04 2024 16:40:47

%S 1,3,5,7,11,16,24,36,53,80,118,177,263,392,585,870,1299,1933,2883,

%T 4295,6400,9540,14212,21185,31564,47042,70101,104463,155680,231985,

%U 345722,515187,767749,1144111,1704963,2540784,3786288,5642420,8408397

%N Number of ternary length-2 squarefree words of length n not containing the subwords 021 or 10.

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,1,-1).

%F a(n) = 2*a(n-2) + a(n-3) - a(n-4).

%F G.f.: ((1+x)*(1+2*x+x^2-x^3))/(1-2*x^2-x^3+x^4).

%e For n=3 the a(3)=7 solutions are 012, 020, 120, 121, 201, 202, 212.

%K nonn,easy

%O 0,2

%A _Miquel A. Fiol_, Jun 09 2024