- 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

# Program to find N-th term of series 4, 14, 28, 46, 68, 94, 124, 158, …..in C++

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

## Solution Approach:

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.

## For example,

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

## Example

#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; }

## Output:

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++
- Find the Nth term of the series 14, 28, 20, 40,….. using 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++
- C++ program to find n-th term of series 1, 4, 27, 16, 125, 36, 343...
- Program to find N-th term of series 1 4 15 24 45 60 92... in C++
- Program to find N-th term in the given series in C++
- C Program for N-th term of Geometric Progression series
- C Program for N-th term of Arithmetic Progression series
- C++ Programe to find n-th term in series 1 2 2 3 3 3 4
- 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, 6, 18, 24, … in C++
- Program to find N-th term of series 1, 3, 12, 60, 360...in C++
- Java Program to Find sum of Series with n-th term as n^2 – (n-1)^2

Advertisements