- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# The first term of an AP is $ -5 $ and the last term is 45 . If the sum of the terms of the AP is 120 , then find the number of terms and the common difference.

Given:

The first term of an A.P. is $-5$, the last term is 45 and the sum is 120.

To do:

We have to find the number of terms and the common difference of the A.P.

Solution:

Let the number of terms of the given A.P. be $n$, first term be $a$ and the common differnce be $d$.

First term $a=-5$

Last term $l= 45$

Sum of all the terms $S_{n} =120$

We know that,

Sum of the $n$ terms$ S_{n} =\frac{n}{2}( a+l)$

$\Rightarrow 120=\frac{n}{2}( -5+45)$

$\Rightarrow 120=n(20)$

$\Rightarrow n=\frac{120}{20} =6$

Also,

$l=a+( n-1) d$

Therefore,

On subtituting the values of $a$, $l$ and $n$, we get,

$45=-5+( 6-1) d$

$\Rightarrow 5d=45+5=50$

$\Rightarrow d=\frac{50}{5}$

$=10$

Hence, the number of terms is $6$ and the common difference of the given A.P. is $10$.

- Related Questions & Answers
- Find the Number of quadruples where the first three terms are in AP and last three terms are in GP using C++
- C++ Program to find the sum of the series 23+ 45+ 75+….. upto N terms
- Find the Nth term of the series 9, 45, 243,1377…in C++
- Sum of the first N terms of the series 2,10, 30, 68,…. in C programming
- Sum of the first N terms of the series 5,12, 23, 38…. in C Programming
- Find if a number is part of AP whose first element and difference are given using C++.
- Find Pth term of a GP if Mth and Nth terms are given in C++
- JavaScript code to find nth term of a series - Arithmetic Progression (AP)
- What is the meaning of immutable in term of String in java?
- Sum of the first N terms of the series 2, 6, 12, 20, 30…. in c programming
- Sum of the first and last digit of a number in PL/SQL
- Find sum of the series ?3 + ?12 +.... upto N terms in C++
- What is the term serializability in DBMS?
- Find the indices of the first and last unmasked values in Numpy
- Differentiate between the long-term, short-term, and medium-term schedulers.
- Find the sum of first and last digit for a number using C language

Advertisements