- Related Questions & Answers
- Program to find N-th term of series 3, 6, 18, 24, … in C++
- Program to find N-th term of series 7, 21, 49, 91, 147, 217, …… in C++
- Program to find N-th term of series 3, 5, 33, 35, 53… in C++
- Program to find N-th term of series 1, 2, 11, 12, 21… in C++
- Program to find N-th term of series 2, 4, 3, 4, 15… in C++
- Program to find N-th term of series 3 , 5 , 21 , 51 , 95 , … in C++
- Program to find N-th term of series 3, 12, 29, 54, 87, … in C++
- Program to find N-th term of series 9, 23, 45, 75, 113… in C++
- C Program for N-th term of Geometric Progression series
- C Program for N-th term of Arithmetic Progression series
- Program to find N-th term in the given series in C++
- Program to find N-th term of series 0, 9, 22, 39, 60, 85, 114, 147, …in C++
- Program to find N-th term of series 1, 6, 17, 34, 56, 86, 121, 162, …in C++
- Program to find N-th term of series 0, 11, 28, 51, 79, 115, 156, 203, …In C++
- Program to find N-th term of series 2, 12, 28, 50, 77, 112, 152, 198, …in C++

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

In this problem, we are given a number N. Our task is to create a Program to find N-th term of series a, b, b, c, c, c…in C++.

To find the Nth term of the series −

**a, b, b, c, c, c, d, d, d, d,....Nterms **

We need to find the general term of the series.

**Let’s take an example to understand the problem,**

Input

N = 7

Output

d

To find the general term of the series, we need to closely observe the series. The series has 1 a, 2 b’s, 3 c’s, 4 d’s,... This seems to be an AP. And the Nth term is the sum of AP which a and d both 1.

Sum of AP = Nth Term = (n/2)(a+(n-1)d).

The n specifies which character is the Nth term.

Now, lets derive the value of n,

Nth Term = (n/2)*(1 + (n-1)*1) (n/2)*(1 + n - 1) (n/2)*n

$\sqrt{2\square^2}$

#include <iostream> #include <math.h> using namespace std; char findNTerm(int N) { int n = sqrt(2*N); return ((char)('a' + n)); } int main() { int N = 54; cout<<N<<"th term of the series is "<<findNTerm(N); return 0; }

54th term of the series is k

Advertisements