 Hello and welcome to the session. Let us discuss the following question today. The first term of an AP is 5, the last term is 45 and the sum is 400. Find the number of terms and the common difference. Now, let us write the solution. Given the versus, first term of AP is equal to 5, last term is equal to 45, sum is equal to 400. We have to find n and d. We know that s is equal to n by 2 multiplied by 2a plus n minus 1d. Also, it can be written as s is equal to n by 2 a plus an, where an is the nth term. Now, if there are n terms and an is the last term, so sum can also be written as n by 2 a plus l. Now, substituting the values we get, 400 is equal to n by 2 multiplied by 5 plus 45, which implies 400 is equal to n by 2 multiplied by 50. Now here, this gets cancelled by 25, so it implies 400 is equal to 25n, which implies n is equal to 400 by 25, which gets cancelled by 16, so it implies n is equal to 16. Now, we have s is equal to n by 2 multiplied by 2a plus n minus 1d. Now, here we have to find the value of d. So again, substituting the values we get, it implies 400 is equal to 16 by 2 multiplied by 2 into 5 plus 16 minus 1 multiplied by d. Now solving this, this gets cancelled by 8, so it implies 400 is equal to 8 multiplied by 10 plus 15d, which implies 400 is equal to 80 plus 120d, which implies 120d is equal to 400 minus 80, which implies 120d is equal to 320, which implies d is equal to 320 by 120. Now, 0 and 0 gets cancelled, this gets cancelled by 2, so we get here 6 and similarly we get here 16. Now again, canceling it by 2, we get here 3 and we get here 8, which implies d is equal to 8 by 3. Hence, n is equal to 16 and d is equal to 8 by 3 is our required answer. I hope you understood the question. Bye and have a nice day.