

A141819


a(1)=1. a(n) = the smallest integer > a(n1) that is coprime to the number of 1's in the binary representation of n.


2



1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 14, 15, 16, 17, 19, 20, 21, 23, 25, 27, 28, 29, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 45, 47, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 65, 66, 67, 68, 70, 71, 73, 75, 77, 78, 79, 81, 83, 84, 85, 86, 87, 89, 90, 91, 93, 94, 95, 97, 98, 99, 101, 103
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


LINKS



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



STATUS

approved



