Let n be the total number of terms and d be the common difference.
Given:
first term = a = 5
last term = l = 45
Sum of all terms = Sn = 400
Sn = n/2[a + l]
400 = n/2[5 + 45]
n/2 = 400/50
n = 16
There are 16 terms in the AP.
Therefore, 45 is the 16th term of the AP.
45 = a + (16 – 1)d
45 = 5 + 15d
40 = 15d
15d = 40
d = 8/3
Common difference = d = 8/3
Common difference is 8/3 and the number of terms are 16.