The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A340458 Minimum length of the string over the alphabet of 3 or more symbols that has exactly n substring palindromes. Substrings are counted as distinct if they start at different offsets. 1
1, 2, 2, 3, 4, 3, 4, 5, 5, 4, 5, 6, 6, 7, 5, 6, 7, 7, 8, 8, 6, 7, 8, 8, 9, 9, 9, 7, 8, 9, 9, 10, 10, 10, 11, 8, 9, 10, 10, 11, 11, 11, 12, 12, 9, 10, 11, 11, 12, 12, 12, 13, 13, 14, 10, 11, 12, 12, 13, 13, 13, 14, 14, 15, 14, 11, 12, 13, 13, 14, 14, 14, 15, 15, 16, 15, 16, 12, 13, 14, 14, 15, 15, 15, 16, 16, 17, 16, 17, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The uploaded Python script uses G. Manacher's algorithm to efficiently calculate the number of palindromes.
LINKS
FORMULA
a(k*(k+1)/2) = k, from a string of k identical symbols.
EXAMPLE
The string AAA with length 3 has 6 palindromic substrings:
A starting at offset 1,
A starting at offset 2,
A starting at offset 3,
AA starting at offset 1,
AA starting at offset 2,
AAA starting at offset 1.
There is no shorter string with exactly 6 substring palindromes. So a(6) = 3.
CROSSREFS
Sequence in context: A112342 A256094 A063712 * A185977 A204006 A369879
KEYWORD
nonn
AUTHOR
Serguei Zolotov, Feb 13 2021
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 May 13 16:16 EDT 2024. Contains 372522 sequences. (Running on oeis4.)