login
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).
5
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, 37, 30, 67, 97, 41, 46, 29, 25, 27, 45, 36, 54, 72, 21, 28, 42, 35, 49, 84, 19, 38, 57, 95, 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
OFFSET
1,2
COMMENTS
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.
From Michael De Vlieger, Apr 03 2022: (Start)
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).
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.
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.
For sufficiently large n, S is large, but P is large and composite.
In this sequence we may have equality of (one) input and output, since input S or P does not necessarily already exist in a.
(End)
LINKS
Michael De Vlieger, Annotated log-log scatterplot of a(n), n = 1..2^16, showing records in red, local minima in blue, fixed points in gold, and accentuating primes in green.
EXAMPLE
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.
MATHEMATICA
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Apr 03 2022
STATUS
approved