login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A050431 Length of longest palindromic subword of (n base 3). 4
1, 1, 1, 2, 1, 1, 1, 2, 2, 3, 1, 2, 3, 2, 1, 3, 2, 2, 1, 3, 1, 2, 3, 2, 2, 3, 3, 4, 2, 3, 3, 3, 3, 1, 2, 2, 3, 2, 3, 4, 3, 2, 3, 2, 2, 1, 3, 3, 3, 3, 2, 4, 3, 3, 2, 4, 3, 2, 1, 3, 3, 3, 2, 3, 1, 2, 3, 4, 3, 3, 3, 2, 2, 3, 2, 2, 3, 3, 3, 4, 4, 5, 3, 4, 4, 4, 3, 2, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
FORMULA
a(n) <= min(a(3*n), a(3*n+1), a(3*n+2)). [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, 3)), n=1..100); # Robert Israel, Dec 17 2020
CROSSREFS
Sequence in context: A264990 A277315 A277326 * A051574 A029386 A277325
KEYWORD
nonn,base
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)