cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

1, 5, 19, 113, 872, 2357, 619, 831479, 645109, 28011357, 97768316, 377282539, 469754781, 403248635900
Offset: 1

Views

Author

Amiram Eldar, Nov 22 2020

Keywords

Comments

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

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.
		

Crossrefs

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

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]