%I #14 Apr 15 2017 09:40:57
%S 4,6,8,10,9,14,16,6,6,22,9,26,21,27,32,34,10,38,6,14,14,46,9,35,14,15,
%T 21,58,27,62,64,6,6,14,10,74,14,15,6,82,22,86,14,27,30,94,9,14,14,15,
%U 14,106,15,110,21,15,30,118,27,122,93,111,128,10,9,134,6
%N a(n) = the smallest positive integer that contains the same number of 1's as n when a(n) and n are written in binary, is not coprime to n, and is not a divisor of n.
%H Rémy Sigrist, <a href="/A161396/b161396.txt">Table of n, a(n) for n = 2..10000</a>
%e 6_10 (6 in decimal) is 110_2 (110 in binary). 9_10 = 1001_2, which contains the same number of ones in the binary expansion. 9 isn't coprime to 6; they share prime factor 3 and 9 isn't a divisor of 6. No positive integer less than 9 has these properties. Therefore, a(6) = 9.
%Y Cf. A145256, A161397
%K base,nonn
%O 2,1
%A _Leroy Quet_, Jun 09 2009
%E Offset corrected and more terms from _Rémy Sigrist_, Apr 15 2017