OFFSET
1,2
LINKS
Owen Whitby, Table of n, a(n) for n=1..200
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
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Jul 25 2008
EXTENSIONS
a(21) to a(200) from Owen Whitby, Oct 22 20=
STATUS
approved