login
A377407
Lexicographically earliest sequence of nonnegative integers such that the alternating sums of consecutive terms are all distinct.
1
0, 1, 3, 6, 11, 17, 25, 36, 50, 69, 92, 116, 141, 159, 185, 223, 256, 287, 340, 398, 445, 479, 536, 568, 596, 669, 767, 875, 969, 1078, 1154, 1225, 1292, 1338, 1502, 1658, 1764, 1917, 2012, 2105, 2272, 2468, 2640, 2754, 2837, 2955, 3204, 3429, 3648, 3888, 4147
OFFSET
1,3
COMMENTS
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).
This sequence is a variant of A101274 and A363446; here we consider alternating sums, there sums of consecutive terms.
By necessity, all terms are distinct.
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).
LINKS
Rémy Sigrist, C++ program
EXAMPLE
The first terms, alongside the alternate sums of consecutive terms ending with a(n), are:
n a(n) Alternating sums
-- ---- -------------------------------------------
1 0 0
2 1 -1, 1
3 3 2, -2, 3
4 6 -4, 4, -3, 6
5 11 7, -7, 8, -5, 11
6 17 -10, 10, -9, 12, -6, 17
7 25 15, -15, 16, -13, 19, -8, 25
8 36 -21, 21, -20, 23, -17, 28, -11, 36
9 50 29, -29, 30, -27, 33, -22, 39, -14, 50
10 69 -40, 40, -39, 42, -36, 47, -30, 55, -19, 69
PROG
(C++) // See Links section.
CROSSREFS
Sequence in context: A119639 A281376 A247586 * A107957 A000603 A003453
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Oct 27 2024
STATUS
approved