login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Michael De Vlieger, Annotated log-log scatterplot of a(n) n = 1..2^14, showing records in red and a(n) = 2 in blue, highlighting fixed points in gold.
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 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
Sequence in context: A324104 A278233 A354753 * A354858 A128923 A153835
KEYWORD
nonn,look
AUTHOR
Scott R. Shannon, Jun 06 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 11 21:21 EDT 2024. Contains 372418 sequences. (Running on oeis4.)