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!)
A050433 Length of longest palindromic subword of (n base 5). 4

%I #16 Dec 17 2020 14:27:12

%S 1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,2,2,3,1,1,1,2,3,2,2,2,

%T 1,3,2,1,1,1,3,1,2,1,1,3,1,1,2,2,1,3,1,1,1,2,3,1,1,2,2,3,2,2,1,1,3,2,

%U 1,1,1,3,1,2,2,1,1,3,1,1,2,1,3,1,1,1,2,3,1,2

%N Length of longest palindromic subword of (n base 5).

%H Robert Israel, <a href="/A050433/b050433.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) <= min(a(5*n+k): 0 <= k < 5). [_Reinhard Zumkeller_, Jul 31 2011]

%p LPS:= proc(L) local nL,n,i;

%p nL:= nops(L);

%p for n from nL to 1 by -1 do

%p for i from 1 to nL-n+1 do

%p if L[i..i+n-1] = ListTools:-Reverse(L[i..i+n-1]) then return n fi

%p od od:

%p end proc:

%p seq(LPS(convert(n,base,5)),n=1..100); # _Robert Israel_, Dec 17 2020

%Y Cf. A050430, A050431, A050432

%K nonn,base

%O 1,6

%A _Clark Kimberling_

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 March 29 00:26 EDT 2024. Contains 371264 sequences. (Running on oeis4.)