%I #15 Aug 27 2019 01:20:40
%S 1,1,3,1,3,3,7,1,3,5,7,3,9,7,15,1,3,5,7,5,11,11,15,3,9,13,21,7,21,15,
%T 31,1,3,5,7,9,11,13,15,5,15,21,23,11,27,23,31,3,9,15,21,13,33,27,45,7,
%U 21,29,49,15,45,31,63,1,3,5,7,9,11,13,15,9,19,21
%N For any n > 0: consider the different ways to split the binary representation of 2*n+1 into two nonempty parts, say with value x and y; a(n) is the least possible value of x * y.
%C All terms are odd.
%H Rémy Sigrist, <a href="/A327190/b327190.txt">Table of n, a(n) for n = 1..8192</a>
%F a(n) = 1 iff n is a power of 2.
%F a(n) = n iff n is a positive Mersenne number (A000225). - _Bernard Schott_, Aug 26 2019
%e For n=42:
%e - the binary representation of 85 is "1010101",
%e - there are 6 ways to split it:
%e - "1" and "010101": x=1 and y=21: 1 * 21 = 21,
%e - "10" and "10101": x=2 and y=21: 2 * 21 = 42,
%e - "101" and "0101": x=5 and y=5: 5 * 5 = 25,
%e - "1010" and "101": x=10 and y=5: 10 * 5 = 50,
%e - "10101" and "01": x=21 and y=1: 21 * 1 = 21,
%e - "101010" and "1": x=42 and y=1: 42 * 1 = 42,
%e - hence a(42) = 21.
%o (PARI) a(n) = my (v=oo, b=binary(2*n+1)); for (w=1, #b-1, v=min(v, (fromdigits(b[1..w],2) * fromdigits(b[w+1..#b],2)))); v
%Y See A327186 for other variants.
%Y Cf. A000225.
%K nonn,base
%O 1,3
%A _Rémy Sigrist_, Aug 25 2019
|