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 A351491 #11 Mar 26 2022 22:23:21 %S A351491 0,2,4,6,4,6,8,12,14,16,20,22,24,6,8,10,14,16,18,22,24,26,32,34,36,40, %T A351491 42,44,48,50,52,58,60,62,66,68,70,74,76,78,8,10,12,16,18,20,24,26,28, %U A351491 34,36,38,42,44,46,50,52,54,60,62,64,68,70,72,76,78,80,88 %N A351491 Irregular triangle read by rows: T(n,k) is the minimum number of alphabetic symbols in a regular expression for the k lexicographically first palindromes of length 2*n over a ternary alphabet, n >= 0, 1 <= k <= 3^n. %C A351491 Analogous to A351489 (which is the corresponding sequence for palindromes over binary alphabet). %D A351491 Hermann Gruber and Markus Holzer, Optimal Regular Expressions for Palindromes of Given Length. Extended journal version, in preparation, 2022. %H A351491 Hermann Gruber and Markus Holzer, <a href="https://doi.org/10.4230/LIPIcs.MFCS.2021.52">Optimal Regular Expressions for Palindromes of Given Length</a>, Proceedings of the 46th International Symposium on Mathematical Foundations of Computer Science, Article No. 53, pp. 53:1-53:15, 2021. %F A351491 Let SumOfDigitsInBase(m,b) denote the digit sum of nonnegative integer m in base b. Then the general formula for alphabet size q reads as %F A351491 T(n,k) = 2*n + (2*q*(k-1))/(q-1) - (2*SumOfDigitsInBase(k-1,q))/(q-1). [Gruber and Holzer 2022 theorem 27] %e A351491 Triangle T(n,k) begins: %e A351491 k=1 2 3 4 5 6 ... %e A351491 n=0: 0, %e A351491 n=1: 2, 4, 6; %e A351491 n=2: 4, 6, 8, 12, 14, 16, 20, 22, 24; %e A351491 n=3: 6, 8, 10, 14, 16, 20, 22, 24, 26, 32, 34, 36, 40, 42, 44, 48, 50, 52, 58, 60, 62, 66, 68, 70, 74, 76, 78; %e A351491 ... %Y A351491 Cf. A053735 (ternary sum of digits), A351489 (for binary alphabet). %K A351491 nonn,easy,tabf %O A351491 0,2 %A A351491 _Hermann Gruber_, Feb 13 2022