OFFSET
2,1
COMMENTS
a(n) <= 2n since 2n is trivially a multiple of n and multiplying a number by 2 adds a 0 in base 2. - Stefan Steinerberger, Oct 17 2008
LINKS
Rémy Sigrist, Table of n, a(n) for n = 2..65536
MATHEMATICA
a[n_] := Block[{}, i = n + 1; While[GCD[i, n] == 1 || Not[DigitCount[n, 2, 1] == DigitCount[i, 2, 1]], i++ ]; i]; Table[a[n], {n, 2, 100}] (* Stefan Steinerberger, Oct 17 2008 *)
PROG
(PARI) a(n) = for (m=n+1, oo, if (gcd(m, n)>1 && hammingweight(m)==hammingweight(n), return (m))) \\ Rémy Sigrist, Feb 06 2020
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Oct 05 2008
EXTENSIONS
Edited and corrected by Stefan Steinerberger, Oct 17 2008
STATUS
approved