- 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

In this problem, we are given a number N. Our task is to create a program to find N-th term of series 4, 14, 28, 46, 68, 94, 124, 158, …..in C++.

**Problem Description** − To find the Nth term of series

**4, 14, 28, 46, 68, 94, 124, … (N-terms), **

We will find the general term of the series and calculate the value based on the value of n.

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

**Input** − N = 5

**Output** − 68

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

**4, 14, 28, 46, 68, 94, 124….**

We have 2 in common for all elements.

Series: 2(2, 7, 14, 23, 34, ….) = 2((12 + 1), (22 + 3), (32 + 5), (42 + 7), (52 + 9) ….) = 2((12 + (2-1)), (22 + (4-1)), (32 + (6-1)), (42 + (8-1)), (52 + (10-1)) ….) = 2((12 + ((2*1)-1)), (22 + ((2*2)-1)), (32 + ((2*3)-1)), (42 + ((2*4)-1)), (52 +((2*5)-1)) ….)

The general term of the series can be generalized as −

**T _{n} = 2*(n2 + (2*n-1))**

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

T_{6}= 2*(62 + (2*6 - 1)) = 2*(36 + (12 -1 )) = 2*(36 + 11) = 2*(47) = 94

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

11th term of the series is 284

- Related Questions & Answers
- C++ program to find n-th term of series 2, 10, 30, 68, 130 …
- Program to find N-th term of series 2, 4, 3, 4, 15… 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++
- Program to find N-th term of series 3, 6, 18, 24, … in C++
- C++ program to find n-th term in the series 7, 15, 32, …
- C++ program to find n-th term in the series 9, 33, 73,129 …
- C++ program to find n-th term of series 3, 9, 21, 41, 71…
- Program to find N-th term of series 7, 21, 49, 91, 147, 217, …… in C++
- n-th term of series 1, 17, 98, 354…… in C++
- Program to find N-th term of series a, b, b, c, c, c…in C++
- C++ program to find Nth term of the series 3, 14, 39, 84…
- Program to find N-th term of series 0, 0, 2, 1, 4, 2, 6, 3, 8…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++

Advertisements