OFFSET
1,2
COMMENTS
Odd numbers share a 1-bit (2^0) with all their divisors, hence this sequence deals with even numbers.
FORMULA
a(n) = n iff n belongs to A003714.
EXAMPLE
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.
PROG
(PARI) a(n) = fordiv (n, d, if (bitand(n/d, 2*n)==0, return (n/d)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jan 12 2023
STATUS
approved