login
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

%I #8 Jan 11 2021 21:13:58

%S 1,5,19,113,872,2357,619,831479,645109,28011357,97768316,377282539,

%T 469754781,403248635900

%N 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.

%C a(15) > 6 * 10^12, if it exists.

%e 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.

%e 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.

%t 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]

%Y Cf. A000120, A094387, A339078 (decimal analog).

%K nonn,base,more

%O 1,2

%A _Amiram Eldar_, Nov 22 2020