OFFSET
1,1
COMMENTS
A "minimum palindromic partition size" of a string is the fewest number of palindromes that the string can be partitioned into.
All terms are even because the letters of the alphabet can be swapped (e.g., "101100" can become "010011".)
EXAMPLE
The a(6) = 12 six-character strings that require A090701(6) = 3 partitions are:
100101 via (1001)(0)(1),
100110 via (1001)(1)(0),
101001 via (1)(0)(1001),
101100 via (101)(1)(00),
110010 via (1)(1001)(0),
110100 via (11)(010)(0),
along with the six strings made from swapping the 0's and 1's.
PROG
(Python)
from functools import cache
from itertools import product
def A090701(n): return n//6 + (n+4)//6 + 1 if n != 11 else 5
@cache
def f(w):
if len(w) < 2: return len(w)
return min(1+f(w[i:]) for i in range(1, len(w)+1) if (t:=w[:i]) == t[::-1])
def a(n):
t = A090701(n) # target value
return 2*sum(1 for w in product("01", repeat=n-1) if f("0"+"".join(w)) == t)
print([a(n) for n in range(1, 19)]) # Michael S. Branicky, Jan 24 2026
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Peter Kagey, Jan 19 2018
EXTENSIONS
a(21)-a(30) from Michael S. Branicky, Jan 25 2026
STATUS
approved
