|
|
A354755
|
|
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 the sum a(n) + a(n-1) is distinct from all previous sums a(i) + a(i-1), i=2..n-1.
|
|
4
|
|
|
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, 60, 2, 62, 4, 64, 6, 63, 9, 66, 8, 70, 7, 77, 11, 88, 2, 78, 3, 84, 2, 80, 5, 60, 32, 62, 31, 93, 3, 99, 6, 92, 8, 96, 10, 85, 25
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
In the first 500000 terms the fixed points are 1,2,4,6,2388,2390,2392,2394; it is likely no more exist. In the same range many numbers do not appear, the lowest five being 59,67,73,89,97. It is possible these and many other numbers never appear although this is unknown.
|
|
LINKS
|
|
|
EXAMPLE
|
a(7) = 3 as a(6) = 6, and 3 is the smallest number that shares a factor with 6 and whose sum with the previous term, 6 + 3 = 9, has not 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.
|
|
MATHEMATICA
|
nn = 120; c[_] = 0; a[1] = c[1] = 1; a[2] = j = 2; c[3] = 2; Do[k = 2; While[Nand[c[j + k] == 0, ! CoprimeQ[j, k]], k++]; Set[{a[n], c[j + k]}, {k, n}]; j = k, {n, 3, nn}]; Array[a, nn] (* Michael De Vlieger, Jun 15 2022 *)
|
|
PROG
|
(PARI) lista(nn) = my(va = vector(nn), 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]), vs), k++); va[n] = k; vs[n-2] = k+va[n-1]; ); va; \\ Michel Marcus, Jun 15 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|