OFFSET
1,2
COMMENTS
If n + a(n) = prime p, a(n+1) is the smallest multiple (>1) of p, which has not occurred earlier. 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 and local minima in blue, highlighting primes in green and (composite) prime powers in gold.
EXAMPLE
a(1)=1, then 1+a(1)=2 so a(2) must be 4, the least k != 2 which shares a divisor with 2.
MATHEMATICA
nn = 66; c[_] = False; u = 2; a[1] = j = 1; c[1] = True; Do[Set[{k, m}, {u, n + j - 1}]; While[Or[c[k], k == m, CoprimeQ[k, m]], k++]; Set[{a[n], c[k], j}, {k, True, k}]; If[k == u, While[c[u], u++]], {n, 2, nn}]; Array[a, nn] (* Michael De Vlieger, Oct 05 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Oct 05 2022
STATUS
approved