login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A145254 a(n) = the smallest positive integer that is non-coprime to n and has the same number of 1's in its binary representation as n. 4
2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 3, 13, 7, 15, 2, 17, 3, 19, 5, 7, 11, 23, 3, 25, 13, 15, 7, 29, 15, 31, 2, 3, 6, 7, 3, 37, 14, 15, 5, 41, 7, 43, 11, 15, 23, 47, 3, 7, 14, 15, 13, 53, 15, 55, 7, 15, 29, 59, 15, 61, 31, 63, 2, 5, 3, 67, 6, 21, 7, 71, 3, 73, 14, 15, 14, 77, 15, 79, 5, 21, 14, 83 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
LINKS
MATHEMATICA
Table[Function[k, SelectFirst[Range[2, n], And[! CoprimeQ[#, n], DigitCount[#, 2, 1] == k] &]]@ DigitCount[n, 2, 1], {n, 2, 83}] (* Michael De Vlieger, Oct 26 2017 *)
PROG
(PARI) a(n) = {my(k = 1, hn = hammingweight(n)); while ((hammingweight(k) != hn) || (gcd(n, k) == 1), k++); k; } \\ Michel Marcus, Oct 27 2017
CROSSREFS
Sequence in context: A102095 A331959 A109395 * A163457 A285708 A072593
KEYWORD
base,nonn,look
AUTHOR
Leroy Quet, Oct 05 2008
EXTENSIONS
Extended by Ray Chandler, Nov 03 2008
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 1 22:42 EDT 2024. Contains 372178 sequences. (Running on oeis4.)