This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A352790 #14 Dec 26 2024 20:28:45 %S A352790 1,2,3,5,4,9,6,15,7,11,18,22,8,10,16,13,26,39,65,52,20,12,24,32,14,23, %T A352790 37,30,67,97,41,46,29,25,27,45,36,54,72,21,28,42,35,49,84,19,38,57,95, %U A352790 76,171,114,285,90,50,60,40,48,44,33,66,99,55,77,121,198,242,88,110,80,100,64,82,73 %N A352790 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number that has not appeared that is a divisor of either a(n-2)+a(n-1) or a(n-2)*a(n-1). %C A352790 The sequence shows large variations in its values due to some terms being required to equal the product of two large primes as all other divisors of both the sum and product have been used, e.g., a(25893) = 68485691. In the first 50000 terms there are 28233 occasions where the chosen term is a divisor of the sum and 22777 occasions where it is a divisor of the product. In the same range the fixed points are 1, 2, 3, 42, 3674, 11520, 18515, 39501 - it is likely more exist. The smallest number not to appear is 761, while the primes do not occur in their natural order. It is possible the sequence is finite as two terms could appear whose sum and product divisors have all been used. If not then the sequence is likely a permutation of the positive integers. %C A352790 From _Michael De Vlieger_, Apr 03 2022: (Start) %C A352790 Let S = a(n-1)+a(n+2) and let P = a(n-1)*a(n-2). Let u be the smallest missing number in a(1..n-1). %C A352790 It is possible that S is prime, but P is prime iff either a(n-1)=1 or a(n-2)=1; since a(1) = 1 is given and followed by 2, for n > 2, P is always composite. %C A352790 The axiom a(n) = (k | S) or (k | P) implies (k <= S) or (k <= P). Consequently, u <= k <= max(S,P). Let D contain divisors {d : d | S and d >= u} and let E contain factors {d : d | P and d >= u}. A solution k must appear in T = D U E. %C A352790 For sufficiently large n, S is large, but P is large and composite. %C A352790 In this sequence we may have equality of (one) input and output, since input S or P does not necessarily already exist in a. %C A352790 (End) %H A352790 Michael De Vlieger, <a href="/A352790/b352790.txt">Table of n, a(n) for n = 1..10000</a> %H A352790 Michael De Vlieger, <a href="/A352790/a352790_1.png">Annotated log-log scatterplot of a(n)</a>, n = 1..2^16, showing records in red, local minima in blue, fixed points in gold, and accentuating primes in green. %H A352790 Scott R. Shannon, <a href="/A352790/a352790.png">Line graph of the first 50000 terms</a>. %e A352790 a(4) = 5 as a(2)+a(3) = 5 and a(2)*a(3) = 6. The combined divisors of these two numbers are 1,2,3,5,6, and of those 5 is the smallest that has not appeared. %t A352790 nn = 74; c[_] = 0; u = a[1] = c[1] = 1; a[2] = c[2] = 2; While[c[u] > 0, u++]; Do[k = 1; t = TakeWhile[Reverse@ Union[Divisors[#1 + #2], Divisors[#1*#2]], # >= u &] & @@ {a[i - 2], a[i - 1]}; While[c[t[[-k]]] > 0, k++]; Set[{a[i], c[t[[-k]]]}, {t[[-k]], i}]; If[a[i] == u, While[c[u] > 1, u++]], {i, Length[s] + 1, nn}]; Array[a, nn] (* _Michael De Vlieger_, Apr 03 2022 *) %Y A352790 Cf. A352768, A332301, A351001, A349493, A251622. %K A352790 nonn %O A352790 1,2 %A A352790 _Scott R. Shannon_, Apr 03 2022