
- C++ Basics
- C++ Home
- C++ Overview
- C++ Environment Setup
- C++ Basic Syntax
- C++ Comments
- C++ Data Types
- C++ Variable Types
- C++ Variable Scope
- C++ Constants/Literals
- C++ Modifier Types
- C++ Storage Classes
- C++ Operators
- C++ Loop Types
- C++ Decision Making
- C++ Functions
- C++ Numbers
- C++ Arrays
- C++ Strings
- C++ Pointers
- C++ References
- C++ Date & Time
- C++ Basic Input/Output
- C++ Data Structures
- C++ Object Oriented
- C++ Classes & Objects
- C++ Inheritance
- C++ Overloading
- C++ Polymorphism
- C++ Abstraction
- C++ Encapsulation
- C++ Interfaces
C++ program to find Nth term of the series 5, 13, 25, 41, 61…
In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 5, 13, 25, 41, 61, …
Let’s take an example to understand the problem,
Input
N = 5
Output
61
Explanation
The series is − 5, 13, 25, 41, 61…
Solution Approach
A simple approach to solve the problem is by using the general formula for the nth term of the series. The Nth term is given by,
Nth term = ( (N*N) + ((N+1)*(N+1)) )
Program to illustrate the working of our solution,
Example
#include <iostream> using namespace std; int calcNthTerm(int N) { return ( ( (N + 1)*( N + 1) ) + (N*N) ) ; } int main() { int N = 7; cout<<N<<"th term of the series is "<<calcNthTerm(N); return 0; }
Output
7th term of the series is 113
- Related Articles
- C++ program to find nth term of the series 5, 2, 13 41,...
- C++ program to find Nth term of the series 1, 5, 32, 288 …
- C++ program to find Nth term of the series 1, 8, 54, 384…
- C++ program to find Nth term of the series 3, 14, 39, 84…
- C++ program to find n-th term of series 3, 9, 21, 41, 71…
- Simplify the following :$41 + \frac{1}{5} [[-10 \times (25 - 13 - 3)] \div (-5)]$
- C++ program to Find Nth term of the series 1, 1, 2, 6, 24…
- C++ program to find Nth term of the series 1, 6, 18, 40, 75, ….
- Program to find Fibonacci series results up to nth term in Python
- C++ program to find Nth term of series 1, 4, 15, 72, 420…
- C++ program to find Nth term of the series 0, 2, 4, 8, 12, 18…
- Find the Nth term of the series 9, 45, 243,1377…in C++
- JavaScript code to find nth term of a series - Arithmetic Progression (AP)
- Find the Nth term of the series 14, 28, 20, 40,….. using C++
- Program to find nth Fibonacci term in Python

Advertisements