The sum of a sequence of N
consecutive integers is 2022, where N is greater than 2.
Determine all possible values of N, and the valid sequence for each value of N.
Let A be the first if the consecutive integers. Then the sequence terminates at A+N-1.
The sum can be computed as N*(A+(A+N-1))/2 = N*(2A+N-1)/2. This equals 2022. 2022 = N*(2A+N-1)/2.
Clear the fraction to give 4044 = N*(2A+N-1)
Then N must be a factor of 4044. 4044 has a prime factorization of 2^2 * 3 * 337, so its factors are: 1,2,3,4,6,12,337,674, 1011, 1384, 2022, 4044
Then solve the last equation for A: (4044/N + 1 - N)/2 = 2022/N + (1-N)/2 = A. This last equation implies that either N is odd (A is a sum of two integers) or N is a multiple of 4 (A is a sum of two half-integers) for A to be an integer.
Then the potential values of N are reduced to 1,3,4,12,337,1011,1348,4044. N=1 is the degenerate sequence of one number 2022.
Then the non-degenerate solutions can be described by ordered pairs (N,A)=(3,673), (4,504), (12,163), (337,-162), (1011,-503), (1348,-672), (4044,-2021).
More explicitly the sequences are:
673, 674, 675
504, 505, 506, 507
163, 164, ...., 173, 174
-162, -161, ...., 173, 174
-503, -504, ...., 506, 507
-672, -671, ...., 674, 675
-2021, -2020, ...., 2021, 2022