OFFSET
2,3
COMMENTS
Obviously, any 1-length prefix will be palindromic. Without the 2-length prefix condition, there is only one such string for every length: 10, 100, 1000, etc. (A000012).
FORMULA
a(2) = 1, a(3) = 1, a(2*k) = 2*a(2*k-1)-a(k+1)+a(k), a(2*k+1) = 2*a(2*k)-a(k+1)
EXAMPLE
a(5) = 3 because there are three such strings: 11000, 11001, and 11010. For example, 11100 is not such a string, because a prefix (111) is palindromic.
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lewis Chen, May 04 2019
STATUS
approved