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 A377407 #10 Oct 28 2024 16:24:17 %S A377407 0,1,3,6,11,17,25,36,50,69,92,116,141,159,185,223,256,287,340,398,445, %T A377407 479,536,568,596,669,767,875,969,1078,1154,1225,1292,1338,1502,1658, %U A377407 1764,1917,2012,2105,2272,2468,2640,2754,2837,2955,3204,3429,3648,3888,4147 %N A377407 Lexicographically earliest sequence of nonnegative integers such that the alternating sums of consecutive terms are all distinct. %C A377407 In other words, for any distinct nonempty intervals t..u and v..w, Sum_{i = t..u} a(i)*(-1)^(i-t) <> Sum_{j = v..w} a(j)*(-1)^(j-v). %C A377407 This sequence is a variant of A101274 and A363446; here we consider alternating sums, there sums of consecutive terms. %C A377407 By necessity, all terms are distinct. %C A377407 This sequence is strictly increasing, for if d = a(n) - a(n+1) > 0, then d would have been a better choice for a(n). %H A377407 Rémy Sigrist, <a href="/A377407/b377407.txt">Table of n, a(n) for n = 1..5000</a> %H A377407 Rémy Sigrist, <a href="/A377407/a377407_1.txt">C++ program</a> %e A377407 The first terms, alongside the alternate sums of consecutive terms ending with a(n), are: %e A377407 n a(n) Alternating sums %e A377407 -- ---- ------------------------------------------- %e A377407 1 0 0 %e A377407 2 1 -1, 1 %e A377407 3 3 2, -2, 3 %e A377407 4 6 -4, 4, -3, 6 %e A377407 5 11 7, -7, 8, -5, 11 %e A377407 6 17 -10, 10, -9, 12, -6, 17 %e A377407 7 25 15, -15, 16, -13, 19, -8, 25 %e A377407 8 36 -21, 21, -20, 23, -17, 28, -11, 36 %e A377407 9 50 29, -29, 30, -27, 33, -22, 39, -14, 50 %e A377407 10 69 -40, 40, -39, 42, -36, 47, -30, 55, -19, 69 %o A377407 (C++) // See Links section. %Y A377407 Cf. A101274, A363446. %K A377407 nonn %O A377407 1,3 %A A377407 _Rémy Sigrist_, Oct 27 2024