login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
OFFSET
1,2
COMMENTS
A palindromic partition of "xxoxoxxox" is (x)(xoxox)(xox).
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
Sequence in context: A321469 A365460 A235644 * A175096 A111627 A008618
KEYWORD
nonn,base
AUTHOR
Peter Kagey, Jan 19 2018
STATUS
approved