Part (a): Find the sum

a+(a+1)+(a+2)+.....+(a+n-1)
in terms of a and n
Part (b): Find all pairs of positive integers (a,n) such that n>= 2 and
a+a+1)+(a+2)+....+(a+n-1)=100.

1 answer

a+(a+1)+(a+2)+.....+(a+n-1)

looks like an arithmetic series with
first term a
common difference = a+1 - a = 1
for n terms

so sum = (n/2) (2a + (n-1)(1))
= (n/2)(2a + n-1)

so (n/2)(2a + n - 1) = 100
2an + n^2 - n = 200
2an = 200 - n^2 + n
a = (200 - n^2 + n)/(2n)

n .. a

2 - 49.5
3 - 32.33..
4 - 23.5
5 - 18
6 - 14.1666..
7 - 11.28...
8 - 9 ---------- yeah
9 - not integer
10 - not integer
11 - not integer
12 - not integer
13 - not integer
14 - .642..
15 - negative

testing for (9,8)
a = 9 , d = 1, and n = 8
sum(8) = (8/2)(18 + 7) = 100