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”).

A364608
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.
1
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, 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, 10, 2, 6, 4, 42, 2, 27, 2, 2, 15, 3, 72, 1, 7, 1, 1, 15, 37, 1, 1, 129
OFFSET
1,1
COMMENTS
a(n) is the smallest k such that (2*n+1)^k is in A031443.
Conjecture: a(n) != -1 for all n.
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.
EXAMPLE
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.
PROG
(Python)
def A364608(n):
k = 0
p = 1
while 2*p.bit_count() != p.bit_length():
k += 1
p *= 2*n+1
return k
CROSSREFS
Cf. A031443.
Sequence in context: A021417 A368517 A355346 * A105791 A116515 A303118
KEYWORD
nonn,base
AUTHOR
STATUS
approved