Determine all integers n≥2 for which there are two sequences a1,…,an and b1,…,bn of positive integers such that:
- Each sequence contains at least two terms with different values.
- No nonempty contiguous segment of one sequence has the same sum as a nonempty contiguous segment of the other.
- Their combined total is
i=1∑n(ai+bi)=n(n+2).