OFFSET
1,2
COMMENTS
The sequence produces numerous groupings of primes. For example a(3) to a(16) contains thirteen primes in fourteen terms, a(80) to a(102) contains fourteen primes in twenty-three terms. The sequences is conjectured to be a permutation of the positive integers.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..5000
Michael De Vlieger, Log-log scatterplot of a(n), n = 1..5000, showing primes in red.
EXAMPLE
a(5) = 5 as a(4)*a(3)+|a(4)-a(3)| = 7*3+|7-3| = 25, and 5 is the smallest unused number that shares a factor with 25.
MATHEMATICA
nn = 69; c[_] = 0; a[1] = c[1] = 1; a[2] = c[2] = 2; u = 3; Do[m = #1 #2 + Abs[#2 - #1] & @@ {a[i - 2], a[i - 1]}; If[PrimeQ[m], k = 1; While[c[k m] != 0, k++]; k = k m, k = u; While[Nand[c[k] == 0, ! CoprimeQ[m, k]], k++]]; Set[{a[i], c[k]}, {k, i}]; If[a[i] == u, While[c[u] > 0, u++]], {i, 3, nn}]; Array[a, nn] (* Michael De Vlieger, May 02 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Apr 22 2022
STATUS
approved