login
A298481
a(n) is the number of ways to partition the binary representation of n into the minimal number of palindromic parts.
1
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 3, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1
OFFSET
1,10
COMMENTS
A minimal palindromic partition is a partition of the string into palindromes with the fewest parts.
A298475(n) gives the size of the minimal partition of the binary representation of n.
Records occur at 1, 10, 42, 170, 682, 1357, 5428, 5453, 21812, 21837, 45746, ....
EXAMPLE
The a(n) minimal palindromic partitions for five integers:
n | a(n) | A298475(n) | binary | partitions
----+------+------------+----------+--------------------------------------
2 | 1 | 2 | 10 | 1'0
5 | 1 | 1 | 101 | 101
10 | 2 | 2 | 1010 | 101'0 or 1'010
37 | 2 | 3 | 100101 | 1001'0'1 or 1'00'101
149 | 3 | 3 | 10010101 | 1001'010'1, 1'00'10101, or 1001'0'101
MATHEMATICA
{1, 1}~Join~Array[Function[w, Length@ MinimalBy[#, Length] &@ Select[#, And[AllTrue[#, PalindromeQ], Union@ Map[Length, #] != {1}] &] &@ Union@ Map[Select[SplitBy[#, IntegerQ], IntegerQ@ First@ # &] &, Map[Insert[w, ".", #] &, Map[{#} &, Rest@ Subsets@ Range@ Length@ w, {2}]]]]@ IntegerDigits[#, 2] &, 103, 3] (* Michael De Vlieger, Jan 23 2018 *)
CROSSREFS
Cf. A298475.
Sequence in context: A288120 A156264 A249770 * A324872 A375873 A307608
KEYWORD
nonn,base
AUTHOR
Peter Kagey, Jan 19 2018
STATUS
approved