Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #15 Jan 30 2018 21:14:44
%S 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,
%T 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,
%U 3,3,2,2,1,2,3,2,2,3,2,2,3,2,3,2,1
%N Minimal size of a palindromic partition of the binary representation of n.
%C A palindromic partition of "xxoxoxxox" is (x)(xoxox)(xox).
%H Peter Kagey, <a href="/A298475/b298475.txt">Table of n, a(n) for n = 1..10000</a>
%e The following table shows the partitions of binary representations of n into a(n) palindromes:
%e n | a(n) | binary | partition
%e ----+------+----------+-----------------
%e 5 | 1 | 101 | (101)
%e 6 | 2 | 110 | (11)(0)
%e 7 | 1 | 111 | (111)
%e 13 | 2 | 1101 | (1)(101)
%e 37 | 3 | 100101 | (1001)(0)(1)
%e 203 | 4 | 11001011 | (11)(00)(101)(1)
%t {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 *)
%Y Cf. A006995, A298474.
%K nonn,base
%O 1,2
%A _Peter Kagey_, Jan 19 2018