- Related Questions & Answers
- C++ program to find n-th term of series 3, 9, 21, 41, 71…
- Program to find N-th term of series 1, 2, 11, 12, 21… in C++
- Program to find N-th term of series 3 , 5 , 21 , 51 , 95 , … in C++
- C++ program to find n-th term in the series 7, 15, 32, …
- C++ program to find n-th term of series 1, 3, 6, 10, 15, 21…
- Program to find N-th term of series 0, 9, 22, 39, 60, 85, 114, 147, …in C++
- n-th term of series 1, 17, 98, 354…… in C++
- C++ program to find n-th term in the series 9, 33, 73,129 …
- Program to find N-th term of series 3, 6, 18, 24, … in C++
- C++ program to find n-th term of series 2, 10, 30, 68, 130 …
- Program to find N-th term of series a, b, b, c, c, c…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 2, 4, 3, 4, 15… 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++

- 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 that denotes the nth term of the series. Our task is to create a program to find the N-th term of series 7, 21, 49, 91, 147, 217, …… in C++.

**Problem Description** - We will find the nth term of the series 7, 21, 49, 91, 147, 217, … and for that, we will deduce the general term of the series.

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

**Input** − N = 5

**Output** − 147

Let’s deduce the general term of the given series. The series is −

7, 21, 49, 91, 147, 217, …

We can see that 7 is common here,

7 * (1, 3, 7, 13, 21, 31, ...)

Here, we can observe that this series is increasing like a square series. So,

Series: 7 * (12 , (22 - 1), (33 - 2), (42 - 3), (52 - 4), (62 - 5), ....)

The general term of the series can be generalized as −

Tn = 7*(n2 - (n-1))

Using the general term formula, we can find any value of the series.

**For example,**

T_{4}= 7*((4^2) - (4-1)) = 7(16 - 3) = 91 T_{7}= 7*((7^2) - (7-1)) = 7(49 - 6) = 301

#include <iostream> using namespace std; int findNTerm(int N) { int nthTerm = ( 7*((N*N) - (N - 1)) ); return nthTerm; } int main() { int N = 9; cout<<N<<"th term of the series is "<<findNTerm(N); return 0; }

9th term of the series is 511

Advertisements