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”).

A353075
a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number that has not appeared that shares a factor with a(n-1) * a(n-2) + |a(n-1) - a(n-2)|.
1
1, 2, 3, 7, 5, 37, 14, 541, 8101, 223, 23, 73, 13, 1009, 11, 12097, 46, 22, 4, 6, 8, 10, 12, 16, 18, 15, 9, 21, 24, 26, 20, 28, 30, 32, 34, 25, 859, 35, 17, 613, 69, 42841, 39, 1713601, 19, 92, 27, 2549, 38, 43, 33, 1429, 115, 44, 42, 36, 40, 48, 50, 52, 54, 45, 51, 57, 60, 49, 65, 55, 63
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, 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