login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A377182
Lexicographically earliest infinite sequence of distinct positive integers such that, for n > 2, a(n) shares a factor with a(n-2) mod a(n-1) while a(n-1) mod a(n) has not previously occurred as the mod value for any consecutive pair of terms.
2
2, 3, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 27, 28, 30, 32, 25, 35, 40, 42, 44, 33, 55, 36, 38, 39, 34, 45, 46, 48, 50, 51, 52, 54, 56, 57, 58, 60, 62, 63, 64, 66, 68, 69, 70, 72, 49, 92, 98, 100, 102, 65, 74, 75, 76, 78, 80, 81, 82, 84, 86, 87, 88, 90, 77, 91, 99, 104, 105, 106, 108, 110, 93, 119, 120, 126, 85, 123, 125, 96, 116, 117, 118, 129, 130
OFFSET
1,1
COMMENTS
To ensure the sequence is infinite a(n) must be chosen so that a(n-1) mod a(n) is not 0 or 1. Care must also be taken when choosing a(n) if it is equal to any previously occurring mod value as one is not then guaranteed the next term will exist - in such cases smaller unused mod values must be checked for a valid next term, otherwise the term must be rejected and the next largest candidate trialled.
Surprisingly the first prime to occur is a(94122) = 47857. The next is a(103105) = 26591, and no other primes appear in the first 500000 terms. It is unknown if more occur or why it takes so many terms for a prime to appear. Many small primes, like 5, can never occur as all mod values less than the prime have already appeared. It is conjectured all missing numbers are prime.
In the first 500000 terms the fixed points are 111, 533, 649, 11957; it is unknown if more exist.
Keyword "look" refers to Scott Shannon's image of 100000 terms. - N. J. A. Sloane, Oct 19 2024
LINKS
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^17, showing primes in red, perfect prime powers in gold, squarefree composites in green, and numbers neither squarefree nor prime powers in blue and purple, accentuating powerful numbers that are not prime powers in purple.
Scott R. Shannon, Image of the first 100000 terms. The green line is a(n) = n.
EXAMPLE
a(4) = 6 as a(2) mod a(3) = 3 mod 4 = 3, and 6 is the earliest unused number that shares a factor with 3 while 3 has not occurred as a mod value for any previous pair.
a(9) = 14 as a(7) mod a(8) = 10 mod 12 = 10, and 14 factor with 10. Note that 5 is unused and shares a factor with 10 but a(8) mod 5 = 12 mod 5 = 2, but 2 has previously occurred as the mod value for a(1) mod a(2), so 5 cannot be used. This is the first term to differ from A377078.
MATHEMATICA
nn = 120;
c[_] := False; m[_] := False;
Array[Set[{a[#], c[# + 1]}, {# + 1, True}] &, 2];
Set[{i, j, v}, {a[1], a[2], 2}];
mj = Mod[i, j]; Array[Set[m[#], True] &, mj + 1, 0];
Do[k = v;
While[Set[mk, Mod[j, k]]; Or[c[k], m[mk], m[k], CoprimeQ[mj, k]], k++];
While[m[v], v++];
Set[{a[n], c[k], m[mk], i, j, mj}, {k, True, True, j, k, mk}], {n, 3, nn}];
Array[a, nn] (* Michael De Vlieger, Oct 19 2024 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Scott R. Shannon, Oct 18 2024
STATUS
approved