%I #29 Apr 17 2022 21:28:03
%S 1,2,3,5,4,6,8,7,9,10,19,12,14,13,15,16,31,18,21,24,20,11,27,22,25,30,
%T 33,28,35,36,71,40,37,39,26,45,38,42,32,34,44,46,48,47,50,51,101,52,
%U 17,23,54,49,55,56,57,113,58,60,59,63,61,62,41,66,65,131,64,67,69,68,137,70,72,74
%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 sequences is conjectured to be a permutation of the positive integers. In the first 500000 terms there are 637 fixed points: 1, 2, 3, 6, 9, ..., 180611, 189383, 298097. As the terms slowly move away from the line a(n) = n as n increases it is likely no more exist.
%H Michael De Vlieger, <a href="/A353006/b353006.txt">Table of n, a(n) for n = 1..10000</a>
%H Michael De Vlieger, <a href="/A353006/a353006_2.png">Annotated log-log scatterplot of a(n)</a>, n - 1..2^14, showing records in red, local minima in blue, fixed points highlighted in amber, and primes in green.
%H Scott R. Shannon, <a href="/A353006/a353006_1.png">Image of the first 500000 terms</a>. The green line is y = n.
%e a(4) = 5 as (a(3)+a(2))*|a(3)-a(2)| = (3+2)*|3-2| = 5, and 5 is the smallest unused number that shares a factor with 5.
%e a(5) = 4 as (a(4)+a(3))*|a(4)-a(3)| = (5+3)*|5-3| = 16, and 4 is the smallest unused number that shares a factor with 16.
%t nn = 74, c[_] = 0; Array[Set[{a[#], c[#]}, {#, #}] &, 2]; u = 3; Do[m = (#1 + #2) Abs[(#1 - #2)] & @@ {a[i - 1], a[i - 2]}; k = u; While[Nand[c[k] == 0, ! CoprimeQ[m, k]], k++]; Set[{a[i], c[k]}, {k, i}]; If[k == u, While[c[u] > 0, u++]], {i, Length[s] + 1, nn}]; Array[a, nn] (* _Michael De Vlieger_, Apr 17 2022 *)
%Y Cf. A337136, A352867, A352790, A350927.
%K nonn
%O 1,2
%A _Scott R. Shannon_, Apr 16 2022