A364132
a(n) is the smallest positive integer such that from the set {1, 2, ..., a(n)} one can choose an increasing sequence (s(1), s(2), ..., s(n)) in which every segment has a unique sum of elements.
Original entry on oeis.org
1, 2, 4, 5, 7, 10, 12, 13, 15, 18, 21, 24, 25, 29, 30, 33, 36, 38, 41, 47, 50, 52
Offset: 1
a(6) = 10, because there exists a 6-element increasing sequence on {1,2,...,10} with unique segment sums, namely (1,2,4,5,8,10) and 10 is the least positive integer with that property. The sums in the segments are: 1, 2, 4, 5, 8, 10 for 1-element segments; 3, 6, 9, 13, 18 for 2-element segments; 7, 11, 17, 23 for 3-element segments; 12, 19, 27 for 4-element segments; 20, 29 for 5-element segments; and 30 for the full set.
a(13) = 25 and the corresponding 13-element subsequence is (1,2,11,15,16,17,18,19,20,21,22,24,25).
Cf.
A364153 (without monotonicity assumption).
-
a(n, m=2*n) = my(k=1, s=vector(n, i, []), t, u=m, v=vector(n)); while(k>1||v[1]Jinyuan Wang, Jul 10 2023
A364153
a(n) is the smallest positive integer such that from the set {1, 2, ..., a(n)} one can choose a sequence (s(1), s(2), ..., s(n)) in which every segment has a unique sum.
Original entry on oeis.org
1, 2, 3, 5, 6, 7, 9, 10, 12, 13, 14, 17, 18
Offset: 1
a(6) = 7, because there exists a 6-element sequence on the set {1,2,...,7} with unique segment sums: (2,1,7,6,5,4) and 7 is the least positive integer with such property. The sums in the segments are: 2, 1, 7, 6, 5, 4 for 1-element segments; 3, 8, 13, 11, 9 for 2-element segments; 10, 14, 18, 15 for 3-element segments; 16, 19, 22 for 4-element segments; 21, 23 for 5-element segments; and 25 for the full set.
a(13) = 18 and the exemplary corresponding 13-element sequence is (1, 6, 15, 8, 11, 9, 16, 17, 18, 13, 14, 10, 2).
-
a(n, m=n+6) = my(k=1, s=vector(n, i, []), t, u=m, v=vector(n)); while(k, t=0; v[k]++; if(k==n, if(v[n]Jinyuan Wang, Jul 11 2023
A377407
Lexicographically earliest sequence of nonnegative integers such that the alternating sums of consecutive terms are all distinct.
Original entry on oeis.org
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
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
Showing 1-3 of 3 results.
Comments