%I #42 Aug 02 2023 13:45:21
%S 2,4,2,1,4,2,2,21,8,5,10,2,4,2,2,61,1,1,34,1,18,12,6,1,63,11,49,2,496,
%T 2,2,58,24,12,11,40,7,43,59,3,3,53,31,54,15,7,59,30,5,185,2,5,97,28,
%U 10,2,6,4,42,2,27,2,2,15,3,72,1,7,1,1,15,37,1,1,129
%N Smallest k such that there are as many 0's as 1's in the binary representation of (2*n+1)^k, or -1 if no such k exists.
%C a(n) is the smallest k such that (2*n+1)^k is in A031443.
%C Conjecture: a(n) != -1 for all n.
%C For even m, the proportion of 1's in the binary representation of m^k conjecturally converges to less than 1/2, so unless the numbers of 0's and 1's are equal for some small k, it is likely that no such k exists. For m = 2, 6, 10, 12, 14, 38, 42, 44, 46, ... there do exist such small k = 1, 3, 1, 1, 3, 1, 1, 1, 5, ..., respectively.
%e For n = 2, (2*n+1)^k = 5^k in binary is 101, 11001, 1111101, 1001110001 for k = 1, 2, 3, 4. Only the last of these has as many 0's as 1's, so a(2) = 4.
%o (Python)
%o def A364608(n):
%o k = 0
%o p = 1
%o while 2*p.bit_count() != p.bit_length():
%o k += 1
%o p *= 2*n+1
%o return k
%Y Cf. A031443.
%K nonn,base
%O 1,1
%A _Pontus von Brömssen_, Jul 30 2023