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 A293703 #26 Feb 22 2018 11:04:30 %S A293703 1,3,5,7,9,11,13,15,15,17,17,19,19,21,21,23,23,25,27,29,31,33,35,37, %T A293703 39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83, %U A293703 85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117 %N A293703 a(n) is the length of the longest palindromic subsequence in the first differences of the list of the first n negative and positive roots of floor(tan(k))=1. %C A293703 -A293751 are the negative roots of floor(tan(k))=1. %C A293703 Each increment of n increases the length of the sequence of the first differences by two, whereby the length of the palindrome increases by 0, 1 or 2. %H A293703 V.J. Pohjola, <a href="/A293703/b293703.txt">Table of n, a(n) for n = 1..3001</a> %H A293703 V.J. Pohjola, <a href="https://palindromesdotblog.files.wordpress.com/2018/02/lenpalscon-1-20-a293703.pdf">Line plot for n=1...20</a> %H A293703 V.J. Pohjola, <a href="https://palindromesdotblog.files.wordpress.com/2018/02/lenpalscon-1-200-a293703.pdf">Line plot for n=1...200</a> %H A293703 V.J. Pohjola, <a href="https://palindromesdotblog.files.wordpress.com/2018/02/lenpalscon-1-3000-a293703.pdf">Line plot for n=1...3000</a> %e A293703 For n = 1, the roots are -18, 1; the first differences are 19; the longest palindrome is 19; so a(n) = 1. %e A293703 For n = 2, the roots are -21, -18, 1, 4; the first differences are 3, 19, 3; the longest palindrome is 3, 19, 3; so a(n) = 3. %e A293703 For n = 8, the roots are -87, -84, -65, -62, -43, -40, -21, -18, 1, 4, 23, 26, 45, 48, 67, 70; the first differences are 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3; the longest palindrome is 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3; so a(n) = 15. %e A293703 For n = 9, the roots are -90, -87, -84, -65, -62, -43, -40, -21, -18, 1, 4, 23, 26, 45, 48, 67, 70, 89; first differences are 16, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19; the longest palindrome is 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3; so a(n) = 15. %t A293703 rootsA = {}; Do[ %t A293703 If[Floor[Tan[i]] == 1, AppendTo[rootsA, i]], {i, -10^5, 10^5}] %t A293703 lenN = Length[Select[rootsA, # < 0 &]] %t A293703 r = 200; roots = rootsA[[lenN - r ;; lenN + r + 1]] %t A293703 diff = Differences[roots] %t A293703 center = (Length[diff] + 1)/2; kmax = (Length[diff] + 1)/2 - %t A293703 1; pals = {}; lenpals = {}; lenpal = 1; %t A293703 Do[diffk = diff[[center - k ;; center + k]]; %t A293703 lendiffk = Length[diffk]; w = 3; %t A293703 lenpal = lenpal + 2; (Label[alku]; w = w - 1; %t A293703 pmax = lendiffk - lenpal - (w - 1); %t A293703 t = Table[diffk[[p ;; lenpal + w + p - 1]], {p, 1, pmax}]; %t A293703 s = Select[t, # == Reverse[#] &]; If[s != {}, Goto[end], Goto[alku]]; %t A293703 Label[end]); AppendTo[pals, First[s]]; %t A293703 AppendTo[lenpals, Length[Flatten[First[s]]]]; %t A293703 lenpal = Length[Flatten[First[s]]], {k, 0, kmax}] %t A293703 lenpals (*a[n]=lenpals[[n]]*) %Y A293703 Cf. A293698, A293751, A293700, A293701, A293706, A293699, A293702, A293704, A293705. %K A293703 nonn %O A293703 1,2 %A A293703 _V.J. Pohjola_, Oct 20 2017