A359708 a(n) is the greatest divisor d of 2*n such that the binary expansions of d and 2*n have no common 1-bit.
1, 2, 1, 4, 5, 3, 1, 8, 9, 10, 1, 6, 1, 2, 1, 16, 17, 18, 1, 20, 21, 2, 1, 12, 5, 2, 9, 7, 1, 3, 1, 32, 33, 34, 1, 36, 37, 19, 1, 40, 41, 42, 1, 4, 5, 2, 1, 24, 1, 25, 17, 4, 1, 18, 1, 14, 1, 2, 1, 6, 1, 2, 1, 64, 65, 66, 1, 68, 69, 35, 1, 72, 73, 74, 1, 38, 1
Offset: 1
Examples
For n = 12: - we have (with AND denoting the bitwise AND operator): d d AND 24 -- -------- 1 0 2 0 3 0 4 0 6 0 8 8 12 8 24 24 - hence a(12) = 6.
Programs
-
PARI
a(n) = fordiv (n, d, if (bitand(n/d, 2*n)==0, return (n/d)))
Formula
a(n) = n iff n belongs to A003714.
Comments