# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a352943 Showing 1-1 of 1 %I A352943 #26 May 09 2022 08:39:14 %S A352943 1,2,3,5,4,6,11,17,7,8,10,12,29,14,16,18,47,19,20,22,24,26,28,30,21, %T A352943 33,15,25,32,34,9,27,36,83,13,35,38,39,40,42,44,45,46,48,131,50,52,54, %U A352943 56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,43,55,65,75,85,51,57,63,69,81,86,31 %N A352943 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number that has not appeared that shares a factor with the sum of the largest and second largest value of all previous terms. %C A352943 The sequence contains long runs on even terms, differing by 2, and odd terms, differing by various small even numbers. These runs are often interrupted by a large prime that becomes the new largest term. As this and the previous largest term are typically much larger than any other value the sequence then begins a long series of steadily increasing values that share a factor with the sum of these two largest terms. %C A352943 The sequence is conjectured to be a permutation of the positive integers, although it apparently takes many terms for some primes to appear, e.g., after 200000 terms 73 has not occurred. The primes do not occur in their natural order. Beyond the first three terms there are nine fixed points in the first 200000 terms, although it is likely more exist. %H A352943 Michael De Vlieger, Table of n, a(n) for n = 1..10000 %H A352943 Michael De Vlieger, Annotated log-log scatterplot of a(n), n = 1..2^14, showing records in red, local minima in blue, highlighting primes in green and fixed points in gold. %H A352943 Scott R. Shannon, Image of the first 200000 terms. The green line is y = n. %H A352943 Rémy Sigrist, C++ program %e A352943 a(4) = 5 as the sum of the largest and second-largest value of all previous terms is a(3) + a(2) = 3 + 2 = 5, and 5 is the smallest unused number that shares a factor with 5. %e A352943 a(10) = 8 as the sum of the largest and second-largest value of all previous terms is a(8) + a(7) = 17 + 11 = 28, and 8 is the smallest unused number that shares a factor with 28. %t A352943 nn = 120; c[_] = 0; s = a[1] = c[1] = 1; r = a[2] = c[2] = 2; u = 3; Do[k = u; m = r + s; While[Nand[c[k] == 0, ! CoprimeQ[k, m]], k++]; Set[{a[i], c[k]}, {k, i}]; If[k > s, s = k]; If[k > r, s = r; r = k]; If[k == u, While[c[u] > 0, u++]], {i, 3, nn}]; Array[a, nn] (* _Michael De Vlieger_, May 08 2022 *) %o A352943 (C++) See Links section. %Y A352943 Cf. A351625, A351626, A336957, A352976, A352968, A064413, A270139, A084937, A098550. %K A352943 nonn,look %O A352943 1,2 %A A352943 _Scott R. Shannon_, May 06 2022 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE