Let Si be the sum of the first i numbers in the set M. We have
S2k=(1+2)+(4+5)+⋯+(3k−2+3k−1)=(6⋅1−3)+(6⋅2−3)+⋯+(6k−3)=3k(k+1)−3k=3k2.
Then S2k+1=S2k+3k+1=3k2+3k+1.
Case 1. The sum of 2n consecutive elements of M is
a2k+1+a2k+2+⋯+a2l=S2l−S2k,
where n=l−k. We obtain 3(l2−k2)=300, so therefore
(l−k)(l+k)=100,
giving the systems
{l−k=1l+k=100;{l−k=2l+k=50;{l−k=4l+k=25;{l−k=5l+k=20;{l−k=10l+k=10
Only the second and the last are solvable in integers, and we obtain l=26, k=24 and l=10, k=0. Thus we get n=2, n=10.
Case 2. The sum of 2n consecutive elements of M is
a2k+a2k+1+⋯+a2l−1,
where n=l−k, k≥1. We obtain 3(l2+l−k2−k)=300, and so (l−k)(l+k+1)=100.
The solutions that work are
{l−k=1l+k=99;{l−k=4l+k=24;{l−k=5l+k=19
We get
l=50,k=49, l=14,k=10, l=12,k=7,
meaning that n=1,4,5.
The solutions are n∈{1,2,4,5,10}.