OFFSET
1,2
COMMENTS
Conjectured to be a permutation of the positive integers.
LINKS
Michael De Vlieger, Log-log scatterplot of a(n), n = 1..2^14, labeling records in red, local minima in blue, highlighting prime terms in green, prime partial sums in gold and labeling those in orange italics.
EXAMPLE
a(3) = 4 because 4 is the smallest number which has not occurred already which is prime to s(2)=3 and shares a divisor (2) with a(2)=2.
MATHEMATICA
nn = 68; c[_] = False; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; u = s = 3; Do[j = a[n - 1]; k = u; If[CoprimeQ[j, s], While[Nand[! c[k], CoprimeQ[k, s], ! CoprimeQ[j, k], k != s], k++]]; Set[{a[n], c[k]}, {k, True}]; s += k; If[k == u, While[c[u], u++]], {n, 3, nn}]; Array[a, nn] (* Michael De Vlieger, Oct 13 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Oct 12 2022
STATUS
approved