login
A308659
a(1)=1; for n > 1, a(n) is the length of the longest palindromic suffix of (a(1), ..., a(n-1)).
1
1, 1, 2, 1, 3, 1, 3, 3, 2, 1, 1, 2, 4, 1, 1, 2, 1, 3, 1, 3, 3, 2, 1, 1, 2, 4, 1, 1, 2, 1, 3, 1, 3, 3, 2, 1, 1, 2, 4, 1, 1, 2, 1, 3, 1, 3, 3, 2, 1, 1, 2, 4, 1, 1, 2, 1, 3, 1, 3, 3, 2, 1, 1, 2, 4, 1, 1, 2, 1, 3, 1, 3, 3, 2, 1, 1, 2, 4, 1, 1, 2, 1, 3, 1, 3, 3, 2
OFFSET
1,3
COMMENTS
The sequence repeats after 13 terms.
FORMULA
G.f.: (1 + x + 2*x^2 + x^3 + 3*x^4 + x^5 + 3*x^6 + 3*x^7 + 2*x^8 + x^9 + x^10 + 2*x^11 + 4*x^12)/(1 - x^13). - Stefano Spezia, Jul 21 2019
EXAMPLE
1
[1], 1
[1 , 1], 2
1 , 1 ,[2], 1
1 ,[1 , 2 , 1], 3
1 , 1 , 2 , 1 ,[3], 1
1 , 1 , 2 ,[1 , 3 , 1], 3
1 , 1 , 2 , 1 ,[3 , 1 , 3], 3
1 , 1 , 2 , 1 , 3 , 1 ,[3 , 3], 2
1 , 1 , 2 , 1 , 3 , 1 , 3 , 3 ,[2], 1
1 , 1 , 2 , 1 , 3 , 1 , 3 , 3 , 2 ,[1], 1
1 , 1 , 2 , 1 , 3 , 1 , 3 , 3 , 2 ,[1 , 1], 2
1 , 1 , 2 , 1 , 3 , 1 , 3 , 3 ,[2 , 1 , 1 , 2], 4
CROSSREFS
Cf. A220080.
Sequence in context: A003139 A349918 A244797 * A145652 A373745 A368290
KEYWORD
nonn
AUTHOR
Samuel B. Reid, Jun 15 2019
STATUS
approved