

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.


1



1, 2, 3, 5, 6, 7, 9, 10, 12, 13, 14, 17, 18
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

A segment is a subsequence of consecutive elements.
Conjecture: There exists C such that a(n) < C*n for every sufficiently large n.


LINKS



EXAMPLE

a(6) = 7, because there exists a 6element 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 1element segments; 3, 8, 13, 11, 9 for 2element segments; 10, 14, 18, 15 for 3element segments; 16, 19, 22 for 4element segments; 21, 23 for 5element segments; and 25 for the full set.
a(13) = 18 and the exemplary corresponding 13element sequence is (1, 6, 15, 8, 11, 9, 16, 17, 18, 13, 14, 10, 2).


PROG

(PARI) 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]<u, if(!#setintersect(vector(n, i, t=t+v[n+1i]), s[n]), u=vecmax(v)), k), if(v[k]<u, s[k+1]=setunion(vector(k, i, t=t+v[k+1i]), s[k]); if(#s[k+1]==k*(k+1)/2, v[k+1]=0; k++), k))); if(u<m, u, a(n, m+3)); \\ Jinyuan Wang, Jul 11 2023


CROSSREFS



KEYWORD

nonn,hard,more


AUTHOR



EXTENSIONS



STATUS

approved



