OFFSET
1,1
COMMENTS
Composite version of A386482.
Analogous to A240024 which instead regards the EKG sequence A064413 without the empty product. This sequence comes into and out of agreement with A240024 (ignoring its first term).
Given 2^16 terms, the sole occasion of a(n) | a(n+1) appears to be for n = 32, as 25 | 50. The version of this sequence prohibiting a(n) | a(n+1) appears to differ from this sequence for n = 33..50.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..16384
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^14, showing prime powers in gold, squarefree numbers in green, and numbers neither squarefree nor prime powers in blue or magenta, where magenta represents a powerful number that is not a prime power.
EXAMPLE
a(2) = 6 since 4 is the smallest composite number, and 6 is the smallest number not coprime to 4.
a(3) = 8 since there are no composite numbers available that are less than 6, but 8 is the smallest number that is not coprime to 6.
a(4) = 10 since there are no composite numbers available smaller than 8, and 8 and 9 are coprime.
a(5) = 12 since 9 is coprime to 10.
a(6) = 9 since 9 < 12, and 9 and 12 share the factor 3.
a(7) = 15 since there are no smaller composite numbers available, and 14 is coprime to 9.
a(8) = 18 since 14 and 16, respectively, are coprime to 15.
MATHEMATICA
Block[{c, j, k, s, nn},
nn = 120; s = {4, 6}; c[_] := False; j = s[[-1]]; Map[Set[c[#], True] &, s];
s~Join~Reap[Do[k = j - 1;
While[And[Or[c[k], PrimeQ[k], CoprimeQ[j, k]], k != 1], k--];
If[k == 1, k += j; While[Or[c[k], PrimeQ[k], CoprimeQ[j, k]], k++]];
Set[{c[k], j}, {True, Sow[k]}], {n, Length[s] + 1, nn}] ][[-1, 1]] ]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Sep 09 2025
STATUS
approved
