%I #24 Dec 02 2019 09:21:05
%S 1,3,9,18,30,48,78,126,204,330,534,864,1398,2262,3660,5922,9582,15504,
%T 25086,40590,65676,106266,171942,278208,450150,728358,1178508,1906866,
%U 3085374,4992240,8077614,13069854,21147468,34217322,55364790,89582112,144946902
%N Number of length-n ternary strings x with the property that if w is a subword of x and |w| >= 3, then w reversed is not a subword of x.
%C Also the number of length-n ternary words containing no palindromes of length > 2.
%H Colin Barker, <a href="/A330010/b330010.txt">Table of n, a(n) for n = 0..1000</a>
%H Lukas Fleischer, Jeffrey Shallit, <a href="https://arxiv.org/abs/1911.11704">Words Avoiding Reversed Factors, Revisited</a>, arXiv:1911.00248 [cs.FL], November 26 2019.
%H Lukas Fleischer, Jeffrey Shallit, <a href="https://arxiv.org/abs/1911.12464">Words With Few Palindromes, Revisited</a>, arxiv preprint arXiv:1911.12464 [cs.FL], November 27 2019.
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (1,1).
%F a(n) = 6*F(n+1) for n >= 3, where F(n) is the n-th Fibonacci number.
%F From _Colin Barker_, Nov 27 2019: (Start)
%F G.f.: (1 + 2*x + 5*x^2 + 6*x^3 + 3*x^4) / (1 - x - x^2).
%F a(n) = a(n-1) + a(n-2) for n>4.
%F (End)
%e For n = 4, the 30 strings are 0011, 0012, 0112, 0120, 0122 and the 25 similar strings formed by permutation of the alphabet.
%t CoefficientList[Series[(1 + 2 x + 5 x^2 + 6 x^3 + 3 x^4)/(1 - x - x^2), {x, 0, 36}], x] (* _Michael De Vlieger_, Dec 01 2019 *)
%o (PARI) Vec((1 + 2*x + 5*x^2 + 6*x^3 + 3*x^4) / (1 - x - x^2) + O(x^40)) \\ _Colin Barker_, Nov 27 2019
%Y Cf. A000045.
%K nonn,easy
%O 0,2
%A _Jeffrey Shallit_, Nov 27 2019