OFFSET
1,2
LINKS
Brian Kell, Table of n, a(n) for n=1,...,10000.
EXAMPLE
19 in binary is 10011, which has 3 ones. a(18) = 23. Checking the integers > 23, 24 is not coprime to 3. But 25 is coprime to 3. So a(19) = 25.
MATHEMATICA
sicp[{n_, a_}]:=Module[{si=a+1, c=DigitCount[n+1, 2, 1]}, While[!CoprimeQ[c, si], si++]; {n+1, si}]; NestList[sicp, {1, 1}, 80][[All, 2]] (* Harvey P. Dale, Jan 06 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jul 08 2008
STATUS
approved