OFFSET
1,2
COMMENTS
This sequence uses a combination of the term selection rules of A354755 and A354753. The first forty-five terms are the same as A354755 beyond which they differ; see the examples below. In the first 500000 terms only six terms are prime, 2,3,7,19, with 2 and 3 occurring twice, the last being a(47) = 7. It is unknown if more appear. The only fixed points are 1,2,4,6, and it is likely no more exist.
LINKS
Scott R. Shannon, Image of the first 500000 terms. The green line is y = n.
EXAMPLE
a(7) = 3 as a(6) = 6, and 3 is the smallest number that shares a factor with 6 and whose sum and product with the previous term, 6 + 3 = 9 and 6 * 3 = 18, have not previously appeared. Note 2 shares a factor with 6 but 6 + 2 = 8, and a sum of 8 has already occurred with a(4) + a(5) = 4 + 4 = 8, so 2 cannot be chosen.
a(46) = 63 as a(45) = 3, and 63 is the smallest number that shares a factor with 3 and whose sum and product with the previous term, 3 + 63 = 66 and 3 * 63 = 189, have not previously appeared. Note 60 shares a factor with 3 but the product 3 * 60 = 180 has already occurred with a(19) * a(20) = 12 * 15 = 180, so 60 cannot be chosen. This is the first term to differ from A354755.
PROG
(PARI) lista(nn) = my(va = vector(nn), vp = vector(nn-2), vs = vector(nn-2)); va[1] = 1; va[2] = 2; for (n=3, nn, my(k=2); while ((gcd(k, va[n-1]) == 1) || #select(x->(x==k*va[n-1]), vp) || #select(x->(x==k+va[n-1]), vs), k++); va[n] = k; vp[n-2] = k*va[n-1]; vs[n-2] = k+va[n-1]; ); va; \\ Michel Marcus, Jun 17 2022
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Scott R. Shannon, Jun 09 2022
STATUS
approved