login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A050432
Length of longest palindromic subword of (n base 4).
4
1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 3, 1, 1, 2, 3, 2, 2, 1, 3, 2, 1, 1, 3, 1, 2, 2, 1, 3, 1, 1, 2, 3, 1, 2, 2, 3, 2, 1, 1, 3, 2, 2, 1, 1, 3, 1, 2, 1, 3, 1, 1, 2, 3, 2, 2, 2, 3, 3, 4, 2, 2, 3, 3, 3, 3, 3, 1, 2, 1, 3, 1, 1, 2, 2, 3, 2, 2, 3, 4, 3, 3, 2, 3, 2
OFFSET
1,5
LINKS
FORMULA
a(n) <= min(a(4*n+k): 0 <= k < 4). [Reinhard Zumkeller, Jul 31 2011]
MAPLE
LPS:= proc(L) local nL, n, i;
nL:= nops(L);
for n from nL to 1 by -1 do
for i from 1 to nL-n+1 do
if L[i..i+n-1] = ListTools:-Reverse(L[i..i+n-1]) then return n fi
od od:
end proc:
seq(LPS(convert(n, base, 4)), n=1..100); # Robert Israel, Dec 17 2020
CROSSREFS
KEYWORD
nonn,base
STATUS
approved