login
A354858
a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number that shares a factor with a(n-1) and both the sum a(n) + a(n-1) is distinct from all previous sums, a(i) + a(i-1), i=2..n-1, and the product a(n) * a(n-1) is distinct from all previous products, a(i) * a(i-1), i=2..n-1
1
1, 2, 2, 4, 4, 6, 3, 9, 6, 8, 8, 10, 10, 12, 9, 15, 10, 16, 12, 15, 15, 18, 14, 20, 15, 21, 18, 20, 20, 22, 22, 24, 21, 27, 24, 26, 26, 28, 21, 35, 20, 38, 19, 57, 3, 63, 7, 56, 6, 58, 10, 55, 20, 52, 22, 55, 25, 60, 9, 69, 12, 70, 14, 72, 15, 75, 18, 70, 21, 75, 24, 68, 26, 72, 28, 74, 30, 65
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