This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A329023 #40 Aug 26 2025 12:42:22 %S A329023 1,3,9,27,81,42,54,66,78,96,120,144,174,216,264,318,390,480,582,708, %T A329023 870,1062,1290,1578,1932,2352,2868,3510,4284,5220,6378,7794,9504, %U A329023 11598,14172,17298,21102,25770,31470,38400,46872,57240,69870,85272,104112,127110,155142 %N A329023 Number of length-n ternary words having at most 5 palindromic subwords (including the empty word). %H A329023 Colin Barker, <a href="/A329023/b329023.txt">Table of n, a(n) for n = 0..1000</a> [a(0)=1 prepended by Georg Fischer, 03 Dec 2019] %H A329023 G. Fici and L. Q. Zamboni, <a href="https://arxiv.org/abs/1301.3376">On the least number of palindromes contained in an infinite word</a>, arXiv:1301.3376 [cs.DM], 2013. %H A329023 G. Fici and L. Q. Zamboni, <a href="https://doi.org/10.1016/j.tcs.2013.02.013">On the least number of palindromes contained in an infinite word</a>, Theoret. Comput. Sci. 481 (2013), 1-8. %H A329023 Lukas Fleischer and 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 A329023 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,1,1). %F A329023 a(n) = a(n-3) + a(n-4) for n >= 9. %F A329023 a(n) = 6*A164317(n) for n >= 5. %F A329023 G.f.: (1 + 3*x + 9*x^2 + 26*x^3 + 77*x^4 + 30*x^5 + 18*x^6 - 42*x^7 - 45*x^8) / (1 - x^3 - x^4). - _Colin Barker_, Nov 02 2019 %e A329023 For n=6 the examples are 001200, 001201, 010210, 011201, 012001, 012010, 012011, 012012, 012201 under permutation of the letters. %t A329023 LinearRecurrence[{0, 0, 1, 1}, {1, 3, 9, 27, 81, 42, 54, 66, 78}, 50] (* _Paolo Xausa_, Aug 26 2025 *) %o A329023 (PARI) Vec((1 + 3*x + 9*x^2 + 26*x^3 + 77*x^4 + 30*x^5 + 18*x^6 - 42*x^7 - 45*x^8) / (1 - x^3 - x^4) + O(x^47)) \\ _Colin Barker_, Nov 02 2019; adapted to a(0)=1 by _Georg Fischer_, Dec 03 2019 %Y A329023 Cf. A164317(n). %K A329023 nonn,easy,changed %O A329023 0,2 %A A329023 _Jeffrey Shallit_, Nov 02 2019 %E A329023 a(0) = 1 prepended by _Jeffrey Shallit_, Dec 02 2019