- 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 value N. Our task is to create a program to Find Nth number of the series 1, 6, 15, 28, 45, …

In the series, every element is 2 less than the mean of the previous and next element.

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

N = 5

45

The Nth term of the series 1, 6, 15, 28, 45, … can be found using the formula,

T_{N}= 2*N*N - N

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

#include <iostream> using namespace std; #define mod 1000000009 int calcNthTerm(long n) { return (((2 * n * n) % mod) - n + mod) % mod; } int main(){ long N = 19; cout<<N<<"th Term of the series is "<<calcNthTerm(N); return 0; }

19th Term of the series is 703

- Related Questions & Answers
- C++ program to Find Nth term of the series 1, 1, 2, 6, 24…
- C++ program to find Nth term of series 1, 4, 15, 72, 420…
- C++ program to find Nth term of the series 1, 6, 18, 40, 75, ….
- C++ program to find n-th term of series 1, 3, 6, 10, 15, 21…
- 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…
- Program to find N-th term of series 1 4 15 24 45 60 92... in C++
- C++ Program to find the sum of the series 23+ 45+ 75+….. upto N terms
- Sum of the series 1, 3, 6, 10… (Triangular Numbers) in C++
- C++ program to find n-th term in the series 7, 15, 32, …
- C++ program to find Nth term of the series 3, 14, 39, 84…
- Program to find N-th term of series 1, 6, 17, 34, 56, 86, 121, 162, …in C++
- Program to find N-th term of series 9, 23, 45, 75, 113… in C++
- C++ program to find Nth term of the series 5, 13, 25, 41, 61…
- Program to find N-th term of series 3, 6, 18, 24, … in C++

Advertisements