- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies

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

# Find the Nth term of the series 9, 45, 243,1377…in C++

In this problem, we are given an integer value N.Our task is to Find the nth term of the series −

*9, 45, 243, 1377, 8019, …*

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

Input : N = 4 Output : 1377

## Solution Approach

A simple solution to find the problem is by finding the Nth term using observation technique. On observing the series, we can formulate as follow −

(1^{1} + 2^{1})*3^{1} + (1^{2} + 2^{2})*3^{2} + (1^{3} + 2^{3})*3^{3} … + (1^{n} + 2^{n})*3^{n}

## Example

Program to illustrate the working of our solution

#include <iostream> #include <math.h> using namespace std; long findNthTermSeries(int n){ return ( ( (pow(1, n) + pow(2, n)) )*pow(3, n) ); } int main(){ int n = 4; cout<<n<<"th term of the series is "<<findNthTermSeries(n); return 0; }

## Output

4th term of the series is 1377

- Related Articles
- Program to find N-th term of series 9, 23, 45, 75, 113… in C++
- Find the Nth term of the series 14, 28, 20, 40,….. using C++
- Find the nth term of the series 0, 8, 64, 216, 512,... in C++
- 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 nth term of the series 5, 2, 13 41,...
- If the nth term of the A.P. $9, 7, 5, …$ is same as the nth term of the A.P. $15, 12, 9, …$ find $n$.
- C++ program to find Nth number of the series 1, 6, 15, 28, 45, …..
- 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, ….
- C++ program to find Nth term of the series 5, 13, 25, 41, 61…
- Find the Nth term of the series where each term f[i] = f[i – 1] – f[i – 2] in C++
- C++ program to find Nth term of the series 0, 2, 4, 8, 12, 18…
- C++ program to find Nth term of series 1, 4, 15, 72, 420…

Advertisements