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!)
A143114 a(n) = the smallest positive integer that is coprime to n and has the same number of (nonleading) 0's in its binary representation as n has in binary. 2
1, 5, 1, 9, 2, 5, 1, 17, 4, 9, 2, 19, 2, 5, 1, 33, 8, 17, 4, 17, 4, 9, 2, 17, 4, 9, 2, 9, 2, 11, 1, 65, 16, 33, 8, 67, 8, 17, 4, 33, 8, 17, 4, 17, 4, 9, 2, 67, 8, 17, 4, 17, 4, 19, 2, 17, 4, 9, 2, 19, 2, 5, 1, 129, 32, 65, 16, 65, 16, 33, 8, 65, 16, 33, 8, 33, 8, 17, 4, 131, 16, 33, 8, 67 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
For n = 20: 20 in binary is 10100, which has three 0's. The positive integers that each have three 0's in their binary representations are 8,17,18,20, etc. The smallest of these that is coprime to 20 is 17. So a(20) = 17.
MATHEMATICA
spi[n_]:=Module[{z=DigitCount[n, 2, 0], k=1}, While[DigitCount[k, 2, 0]!=z || !CoprimeQ[ k, n], k++]; k]; Array[spi, 90] (* Harvey P. Dale, Apr 19 2016 *)
CROSSREFS
Cf. A143113.
Sequence in context: A147319 A147326 A336048 * A103133 A098318 A360750
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Jul 25 2008
EXTENSIONS
a(21) to a(200) from Owen Whitby, Oct 22 20=
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 April 16 10:45 EDT 2024. Contains 371709 sequences. (Running on oeis4.)