login
A354732
Lexicographically earliest infinite sequence of distinct positive integers such that in any run of four consecutive terms there is only one pair of terms which share a prime divisor, the rest are all pairwise coprime.
2
1, 2, 3, 4, 5, 8, 7, 6, 11, 9, 13, 12, 17, 10, 19, 14, 23, 16, 15, 21, 29, 22, 20, 27, 31, 25, 18, 24, 37, 35, 26, 32, 33, 41, 28, 34, 39, 43, 38, 40, 47, 49, 30, 36, 53, 59, 42, 44, 61, 65, 45, 46, 67, 51, 50, 52, 71, 57, 56, 58, 55, 69, 62, 63, 73, 64, 68, 75, 77
OFFSET
1,2
COMMENTS
Can be regarded as the reverse of A354717, which has the opposite coprime relations to those defined here. Primes tend to be records but not all records are primes (8, 16 are nonprime records; 11,13 are primes but not records).
Conjecture: Sequence is a permutation of the positive integers in which the primes appear in their natural order.
LINKS
David A. Corneth, PARI program
Michael De Vlieger, Annotated scatterplot of a(n), n = 1..128 showing primes in red, odd composites in gold, and even numbers in blue, labeling a(n) such that n corresponds to first differences d in the indices of smallest missing numbers that meet or exceed record differences.
Michael De Vlieger, Scatterplot of a(n), n = 1..2048 showing primes in red, odd composites in gold, and even numbers in blue, labeling a(n) such that n corresponds to first differences d in the indices of smallest missing numbers that meet or exceed record differences.
EXAMPLE
a(1,2,3,4) = 1,2,3,4 is the lexicographically earliest string of four consecutive terms which satisfy the definition, hence sequence starts with these terms.
a(12,13,14) = 10,17,6 respectively, and 19 is the smallest term not already seen in the sequence such that 10,17,6,19 satisfy the definition ((10,6)=2, and (10,17)=(10,19)=(17,19)=(17,6)=(6,19)=1); therefore a(15)=19.
MATHEMATICA
nn = 120; c[_] = 0; len = 3; Array[Set[{a[#], c[#]}, {#, #}] &, len + 1]; u = 5;
Do[k = u; While[Nand[c[k] == 0, Or[MemberQ[#, 2], MemberQ[#, 3]] && MemberQ[#, _?(# >= 10 &)] &@ Tally[Flatten[Outer[GCD, #, #]]][[All, -1]] &@ {a[i - 3], a[i - 2], a[i - 1], k}], k++]; Set[{a[i], c[k]}, {k, i}]; If[k == u, While[c[u] > 0, u++]], {i, len + 2, nn}]; Array[a, nn] (* Michael De Vlieger, Jun 06 2022 *)
PROG
(PARI) \\ See Corneth link
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from David A. Corneth, Jun 05 2022
STATUS
approved