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 A293702 #26 Feb 24 2018 12:59:23 %S A293702 1,1,3,3,5,5,7,7,7,7,7,7,7,8,8,9,11,11,12,14,16,18,20,22,24,26,26,26, %T A293702 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,29,31,33,35,37,39, %U A293702 41,43,45,47,49,51,53,55,57,59,61,63,63,63,63,63,63,63,63 %N A293702 a(n) is the length of the longest palindromic subsequence in the first n terms of A293751. %H A293702 V.J. Pohjola, <a href="/A293702/b293702.txt">Table of n, a(n) for n = 1..10000</a> %H A293702 V.J. Pohjola, <a href="https://palindromesdotblog.files.wordpress.com/2018/02/lenpalsn-1-30-a293702.pdf">Line plot for n=1…30</a> %H A293702 V.J. Pohjola, <a href="https://palindromesdotblog.files.wordpress.com/2018/02/lenpalsn-1-10000-293702.pdf">Line plot for n=1...10000</a> %e A293702 For n = 1, Roots = 18, 21; First differences = 3; Longest palindrome = 3; a(n) = 1. %e A293702 For n = 2, Roots = 18, 21, 40; First differences = 3, 19; Longest palindrome = 3; a(n) = 1. %e A293702 For n = 3, Roots = 18, 21, 40, 43; First differences = 3, 19, 3; Longest palindrome = 3, 19, 3; a(n) = 3. %e A293702 For n = 20, Roots = 18, 21, 40, 43, 62, 65, 84, 87, 90, 106, 109, 112, 128, 131,134, 150, 153, 156, 172, 175; First differences = 3, 19, 3, 19, 3, 19, 3, 3, 16, 3, 3, 16, 3, 3, 16, 3, 3, 16, 3, 3; Longest palindrome = 3, 3, 16, 3, 3, 16, 3, 3, 16, 3, 3, 16, 3, 3; a(n) = 14. %t A293702 rootsn = Flatten[Position[Table[Floor[Tan[-i]], {i, 1, 10^4}], 1]]; %t A293702 difn = Differences[rootsn]; %t A293702 imax = 100; palsn = {}; lenpalsn = {0}; %t A293702 Do[diffin = difn[[1 ;; i]]; lendiffin = Length[diffin]; %t A293702 pmax = i - Last[lenpalsn]; %t A293702 t = Table[difn[[p ;; i]], {p, 1, pmax}]; %t A293702 sn = Flatten[Select[t, # == Reverse[#] &]]; %t A293702 If[sn == {}, %t A293702 AppendTo[palsn, Last[palsn]] && AppendTo[lenpalsn, Last[lenpalsn]], %t A293702 AppendTo[palsn, sn] && AppendTo[lenpalsn, Length[Flatten[sn]]]], {i, 1, imax}]; %t A293702 Drop[lenpalsn, 1] (* a(n)=Drop[lenpalsn, 1][[n]] *) %Y A293702 Cf. A293698, A293751, A293700, A293701, A293705, A293704, A293699, A293703, A293706. %K A293702 nonn %O A293702 1,3 %A A293702 _V.J. Pohjola_, Oct 16 2017