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”).
%I #24 May 02 2022 12:40:29
%S 1,2,3,7,5,37,14,541,8101,223,23,73,13,1009,11,12097,46,22,4,6,8,10,
%T 12,16,18,15,9,21,24,26,20,28,30,32,34,25,859,35,17,613,69,42841,39,
%U 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
%N 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)|.
%C 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.
%H Michael De Vlieger, <a href="/A353075/b353075.txt">Table of n, a(n) for n = 1..5000</a>
%H Michael De Vlieger, <a href="/A353075/a353075.png">Log-log scatterplot of a(n)</a>, n = 1..5000, showing primes in red.
%e 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.
%t 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 *)
%Y Cf. A353006, A353082, A352867, A352774, A352768.
%K nonn
%O 1,2
%A _Scott R. Shannon_, Apr 22 2022