- 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 an integer N. The task is to find n-th term in series 9, 33, 73, 129....

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

N = 4

129

The series upto nth term is 9, 33, 73, 129...

The solution to the problem lies in finding the nth term of the series. We will find it mathematically and then apply the general term formula to our program.

First let’s subtract the series by shifting it by one.

Sum = 9 + 33 + 73 + … + t(n-1) + t(n) - Sum = 9 + 33 + 73 + …. + t(n-1) + t(n) 0 = 9 + ((33- 9) + (73 - 33) + … + (tn) - t(n-1)) - t(n) t(n) = 9 + (24 + 40 + 56 + …. ) 24 + 40 + 56 + …. is an A.P. series with common difference 16.

This makes the general term,

t(n) = 9 + [ ((n-1)/2)*(2*(24) + (n-1-1)*16) ]

$$t(n)=9+[\left(\frac{n-1}{2}\right)*((2*24)+(n-2)*16)]$$ $$t(n)=9+[\left(\frac{n-1}{2}\right)*((2*24)+(n-2)*8)]$$

t(n) = 9 + [(n - 1) * ((24) + (n - 2) * 8]

t(n) = 9 + [(n - 1) * ((24) + 8n - 16]

t(n) = 9 + [(n - 1) * (8 + 8n]

t(n) = 9 + 8 * [(n - 1) * (n + 1)]

t(n) = 9 + 8 * [n^{2} - 1^{2}]

t(n) = 9 + 8 * n^{2} - 8

t(n) = 8 * n^{2} + 1

**Program to illustrate the working of our solution,**

#include <iostream> using namespace std; int findNthTerm(int n) { return (8*n*n) + 1 ; } int main(){ int n = 12; cout<<"The series is 9, 33, 73, 129...\n"; cout<<n<<"th term of the series is "<<findNthTerm(n); return 0; }

The series is 9, 33, 73, 129... 12th term of the series is 1153

- Related Questions & Answers
- Program to find N-th term of series 3, 5, 33, 35, 53… in C++
- C++ program to find n-th term of series 3, 9, 21, 41, 71…
- Program to find N-th term of series 9, 23, 45, 75, 113… in C++
- C++ program to find n-th term in the series 7, 15, 32, …
- Program to find N-th term of series 0, 9, 22, 39, 60, 85, 114, 147, …in C++
- 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 0, 7, 8, 33, 51, 75, 102, 133...in C++
- 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++
- Program to find N-th term in the given series in C++
- Program to find N-th term of series 1, 2, 11, 12, 21… 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 , 5 , 21 , 51 , 95 , … in C++

Advertisements