The sum of the first 2k
positive integers is 1+2+3+⋯+(2k−1)+2k=22k(2k+1)=24k2+2k The sum of the k consecutive integers starting at m≥1 is m+(m+1)+(m+2)+⋯+(m+k−1)=km+(1+2+3+⋯+(k−1))=km+2(k−1)k=2k2+2km−k Note that we must have
m≤k+1, otherwise m+k−1>2k. Thus, the sum of the
remaining integers is 24k2+2k−(2k2+2km−k)=23k2−2km+3k So,
we are looking for positive integer pairs (k,m) for which 1≤m≤k+1 and 23k2−2km+3k=819 Rearranging
and factoring, this equation is k(3k−2m+3)=1638 Thus, we have that (k,3k−2m+3) is a divisor pair of 1638. We are assuming that m≤k+1, and so m<k+2, from which it follows that
−2m>−2k−4. Therefore, we have
(3k−2m+3)−k=2k−2m+3>2k+(−2k−4)+3=−1 Note that for an integer to be
greater than −1, it must be at
least 0. Therefore, (3k−2m+3)≥k, and so in each divisor
pair, (k,3k−m+3), 3k−m+3 is the greater of the two. (1638 is not a perfect square, so the
divisors will never be equal.) The ordered divisor pairs of
1638 are
(1,1638), (7,234), (18,91), (2,819), (9,182), (21,78), (3,546), (13,126), (26,63), (6,273), (14,117), (39,42)
Now observe that $3(k+1) - (3k-2m+3) = 2m
> 0$. Therefore, if we triple one more than the smaller
divisor, the result must exceed the larger divisor. Of the divisor pairs
above, only (26,63) and (39,42) have this property.
If k=26 and 3k−2m+3=63, then m=9, and if k=39 and 3k−2m+3=42, then m=39.
The only two possible values of k are k=26 and k=39, and their sum is 26+39=65.