a(n) = the smallest positive integer that is coprime to n and has the same number of 1's in its binary representation as n has in binary.

A143113

a(n) = the smallest positive integer that is coprime to n and has the same number of 1's in its binary representation as n has in binary.

Terms

    a(0) =1a(1) =1a(2) =5a(3) =1a(4) =3a(5) =5a(6) =11a(7) =1a(8) =5a(9) =3a(10) =7a(11) =5a(12) =7a(13) =11a(14) =23a(15) =1a(16) =3a(17) =5a(18) =7a(19) =3a(20) =11a(21) =7a(22) =15a(23) =5a(24) =7a(25) =7a(26) =23a(27) =11a(28) =15a(29) =23

External references