A050433 Length of longest palindromic subword of (n base 5).
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, 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, 1, 1, 1, 3, 1, 2, 2, 1, 1, 3, 1, 1, 2, 1, 3, 1, 1, 1, 2, 3, 1, 2
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
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,5)),n=1..100); # Robert Israel, Dec 17 2020
Formula
a(n) <= min(a(5*n+k): 0 <= k < 5). [Reinhard Zumkeller, Jul 31 2011]