|
|
A298475
|
|
Minimal size of a palindromic partition of the binary representation of n.
|
|
3
|
|
|
1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 3, 3, 2, 2, 3, 2, 2, 3, 1, 2, 2, 2, 2, 3, 1, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 3, 3, 2, 2, 1, 2, 3, 2, 2, 3, 2, 2, 3, 2, 3, 2, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
A palindromic partition of "xxoxoxxox" is (x)(xoxox)(xox).
|
|
LINKS
|
|
|
EXAMPLE
|
The following table shows the partitions of binary representations of n into a(n) palindromes:
n | a(n) | binary | partition
----+------+----------+-----------------
5 | 1 | 101 | (101)
6 | 2 | 110 | (11)(0)
7 | 1 | 111 | (111)
13 | 2 | 1101 | (1)(101)
37 | 3 | 100101 | (1001)(0)(1)
203 | 4 | 11001011 | (11)(00)(101)(1)
|
|
MATHEMATICA
|
{1, 2}~Join~Array[Function[w, Min@ Map[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
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|