cp's OEIS Frontend

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.

A368290 a(n) is the length of the longest palindromic subsequence at symmetrically-spaced indices ending at a(n-1); a(1)=1.

This page as a plain text file.
%I A368290 #32 May 26 2024 08:21:12
%S A368290 1,1,2,1,3,1,3,3,2,5,1,7,1,6,1,6,3,5,5,2,4,1,7,4,2,9,1,11,1,6,5,4,5,4,
%T A368290 3,7,3,9,5,6,7,7,7,5,9,6,5,7,5,5,8,1,11,6,7,7,9,10,1,9,9,6,9,6,11,7,
%U A368290 13,1,12,1,14,1,16,1,17,1,19,1,14,7,9,7,11
%N A368290 a(n) is the length of the longest palindromic subsequence at symmetrically-spaced indices ending at a(n-1); a(1)=1.
%C A368290 A set of indices is symmetric if, listed in increasing or decreasing order, its first differences are a palindromic sequence.
%C A368290 A new value is always followed by 1.
%C A368290 An alternate definition: a(n) is the largest number of coincidences between the subsequence enclosed by m..n-1 and its reverse, where a(n-1)=a(m), maximized over m.
%H A368290 Neal Gersh Tolunsky, <a href="/A368290/b368290.txt">Table of n, a(n) for n = 1..10000</a>
%H A368290 Neal Gersh Tolunsky, <a href="/A368290/a368290.png">Ordinal transform of first 30000 terms</a>.
%H A368290 Neal Gersh Tolunsky, <a href="/A368290/a368290_1.png">Graph of first 100000 terms</a>.
%e A368290 a(10)=5 because we find the following length-5 palindromic subsequence at symmetric indices ending at i=a(n-1)=a(9)=2:
%e A368290   S: 1,1,2,1,3,1,3,3,2
%e A368290   P:     2,  3,1,3,  2
%e A368290 a(14)=6 because of the following length-6 palindromic subsequence:
%e A368290   S: 1,1,2,1,3,1,3,3,2,5,1,7,1
%e A368290   P:   1,  1,    3,3,    1,  1
%o A368290 (PARI) { for (n = 1, #a = vector(83, n, 1), for (k = 1, n-1, if (a[k] == a[n-1], a[n] = max(a[n], sum (i = k, n-1, a[i] == a[n-1+k-i]);););); print1 (a[n]", ");); } \\ _Rémy Sigrist_, Dec 20 2023
%Y A368290 Cf. A308659, A362881.
%K A368290 nonn
%O A368290 1,3
%A A368290 _Neal Gersh Tolunsky_, Dec 19 2023
%E A368290 More terms from _Rémy Sigrist_, Dec 20 2023