This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A337490 #30 May 06 2021 03:22:48 %S A337490 1,2,4,7,11,5,6,13,21,30,10,21,33,46,14,29,45,62,18,37,57,78,22,45,69, %T A337490 94,26,53,81,110,140,171,203,236,270,305,341,378,416,39,79,120,162, %U A337490 205,249,294,340,387,3,52,102,17,69,122,176,231,287,344,402,461,521,582,644,707,771,836,902,969 %N A337490 a(0)=1; for n > 0, a(n) = the greatest common divisor (GCD) of n and the sum of all previous terms if the GCD is not already in the sequence; otherwise a(n) = a(n-1) + n. %C A337490 The sequence displays the unusual behavior of decreasing 53 times in the first 1975 terms, due to the existence of a GCD which has not previously appeared in the sequence, but then not decreasing again for n up to at least 100 million. In this period there are 37 repeated terms, the first being 21 at n=11 and the last 161202 at n=2054. In the same range many values do not appear, for example 16,23,28,32,36. It is unknown when the sequence decreases again, or if all values eventually appear. The 100 millionth term is 4999999948050717. %C A337490 See the companion sequence A333980 for the sum of the terms from a(0) to a(n). %H A337490 Scott R. Shannon, <a href="/A337490/b337490.txt">Table of n, a(n) for n = 0..10000</a> %H A337490 Scott R. Shannon, <a href="/A337490/a337490_2.png">Graph of the terms for n=0..2500</a>. This includes the last known decrease in the sequence, n(1974) = 42. %H A337490 Scott R. Shannon, <a href="/A337490/a337490_1.png">Graph of the terms for n=0..10000000</a>. %e A337490 a(2) = 4 as the sum of all previous terms is a(0)+a(1) = 3, and the GCD of 3 and 2 is 1, which has already appeared in the sequence. Therefore a(2) = a(1) + n = 2 + 2 = 4. %e A337490 a(4) = 11 as the sum of all previous terms is a(0)+...+a(3) = 14, and the GCD of 14 and 4 is 2. However 2 has already appeared so a(4) = a(3) + n = 7 + 4 = 11. %e A337490 a(5) = 5 as the sum of all previous terms is a(0)+...+a(4) = 25, and the GCD of 25 and 5 is 5, and as 5 has not previous appeared a(5) = 5. %o A337490 (PARI) lista(nn) = {my(va = vector(nn), s=0); va[1] = 1; s += va[1]; for (n=2, nn, my(g = gcd(n-1, s)); if (#select(x->(x==g), va), va[n] = va[n-1]+n-1, va[n] = g); s += va[n];); va;} \\ _Michel Marcus_, Sep 05 2020 %Y A337490 Cf. A333980, A333826 (same rules but starting a(1)=1), A165430, A064814, A082299, A005132, A336957. %K A337490 nonn %O A337490 0,2 %A A337490 _Scott R. Shannon_, Aug 29 2020