We know that the formula for the nth term is tn=a+(n−1)d, where a is the first term, d is the common difference.
It is given that the pth term of an A.P is q and qth term of an A.P is p, therefore,
q=a+(p−1)d.........(1)
p=a+(q−1)d.........(2)
Subtract equation 2 from 1 as follows:
(a−a)+[(p−1)d−(q−1)d]=q−p⇒d(p−1−q+1)=q−p⇒d(p−q)=−(p−q)⇒d=−(p−q)(p−q)=−1
Substitute the value of common difference d in equation 1:
q=a+(p−1)(−1)⇒q=a−p+1⇒a=q+p−1
Now, the nth term with a=q+p−1 and d=−1 can be obtained as follows:
tn=a+(n−1)d=q+p−1+(n−1)(−1)=q+p−1−n+1=p+q−n
Hence, the nth term is (p+q−n).