The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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

%I #18 Jun 16 2022 07:20:28

%S 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,

%T 20,20,22,22,24,21,27,24,26,26,28,21,35,20,38,19,57,3,60,2,62,4,64,6,

%U 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

%N 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.

%C 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.

%H Michael De Vlieger, <a href="/A354755/b354755.txt">Table of n, a(n) for n = 1..10000</a>

%H Michael De Vlieger, <a href="/A354755/a354755_1.png">Annotated log-log scatterplot of a(n)</a> n = 1..2^14, showing records in red and a(n) = 2 in blue, highlighting fixed points in gold.

%H Scott R. Shannon, <a href="/A354755/a354755.png">Image of the first 500000 terms</a>. The green line is y = n.

%e 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.

%t 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 *)

%o (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

%Y Cf. A064413, A354727, A354687, A354753, A353989, A354087, A352763

%K nonn,look

%O 1,2

%A _Scott R. Shannon_, Jun 06 2022

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 June 5 08:55 EDT 2024. Contains 373105 sequences. (Running on oeis4.)