A339079 a(n) is the least number which is coprime to its binary weight (A094387) with a gap n to the next term of A094387, or 0 if such a number does not exist.
1, 5, 19, 113, 872, 2357, 619, 831479, 645109, 28011357, 97768316, 377282539, 469754781, 403248635900
Offset: 1
Examples
a(1) = 1 since both 1 and 2 = 1 + 1 are coprime to their binary weight, and they are the least pair of consecutive numbers with this property. a(2) = 5 since 5 and 7 = 5 + 2 are coprime to their binary weight, and 6 is not since gcd(6, A000120(6)) = 2, and they are the least pair with a difference 2 with this property.
Programs
-
Mathematica
copQ[n_] := CoprimeQ[n, DigitCount[n, 2, 1]]; s[mx_] := Module[{c = 0, n1 = 1, n2, seq, d}, seq = Table[0, {mx}]; n2 = n1 + 1; While[c < mx, While[! copQ[n2], n2++]; d = n2 - n1; If[d <= mx && seq[[d]] == 0, c++; seq[[d]] = n1]; n1 = n2; n2++]; seq]; s[9]
Comments