Given first term (a), common difference (d) and a integer N of the Arithmetic Progression series, the task is to find N^{th}term of the series.

**Examples :**

Input : a = 2 d = 1 N = 5 Output : The 5th term of the series is : 6 Input : a = 5 d = 2 N = 10 Output : The 10th term of the series is : 23

**Approach:**

We know the Arithmetic Progression series is like = 2, 5, 8, 11, 14 …. …

In this series 2 is the stating term of the series .

Common difference = 5 – 2 = 3 (Difference common in the series).

so we can write the series as :t

_{1}= a_{1}

t_{2}= a_{1}+ (2-1) * d

t_{3}= a_{1}+ (3-1) * d

.

.

.

t_{N}= a_{1}+ (N-1) * d

To find the N^{th} term in the Arithmetic Progression series we use the simple formula .

T_{N}= a_{1}+ (N-1) * d

## C++

`// CPP Program to find nth term of ` `// Arithmetic progression ` `#include <bits/stdc++.h> ` `using` `namespace` `std; ` ` ` `int` `Nth_of_AP(` `int` `a, ` `int` `d, ` `int` `N) ` `{ ` ` ` `// using formula to find the ` ` ` `// Nth term t(n) = a(1) + (n-1)*d ` ` ` `return` `(a + (N - 1) * d); ` ` ` `} ` ` ` `// Driver code ` `int` `main() ` `{ ` ` ` `// starting number ` ` ` `int` `a = 2; ` ` ` ` ` `// Common difference ` ` ` `int` `d = 1; ` ` ` ` ` `// N th term to be find ` ` ` `int` `N = 5; ` ` ` ` ` `// Display the output ` ` ` `cout << ` `"The "` `<< N ` ` ` `<<` `"th term of the series is : "` ` ` `<< Nth_of_AP(a,d,N); ` ` ` ` ` `return` `0; ` `} ` |

*chevron_right*

*filter_none*

## Java

`// Java program to find nth term ` `// of Arithmetic progression ` `import` `java.io.*; ` `import` `java.lang.*; ` ` ` `class` `GFG ` `{ ` ` ` `public` `static` `int` `Nth_of_AP(` `int` `a, ` ` ` `int` `d, ` ` ` `int` `N) ` ` ` `{ ` ` ` `// using formula to find the Nth ` ` ` `// term t(n) = a(1) + (n-1)*d ` ` ` `return` `( a + (N - ` `1` `) * d ); ` ` ` `} ` ` ` ` ` `// Driver code ` ` ` `public` `static` `void` `main(String[] args) ` ` ` `{ ` ` ` `// starting number ` ` ` `int` `a = ` `2` `; ` ` ` ` ` `// Common difference ` ` ` `int` `d = ` `1` `; ` ` ` ` ` `// N th term to be find ` ` ` `int` `N = ` `5` `; ` ` ` ` ` `// Display the output ` ` ` `System.out.print(` `"The "` `+ N + ` ` ` `"th term of the series is : "` `+ ` ` ` `Nth_of_AP(a, d, N)); ` ` ` `} ` `} ` |

*chevron_right*

*filter_none*

## Python3

`# Python 3 Program to ` `# find nth term of ` `# Arithmetic progression ` ` ` `def` `Nth_of_AP(a, d, N) : ` ` ` ` ` `# using formula to find the ` ` ` `# Nth term t(n) = a(1) + (n-1)*d ` ` ` `return` `(a ` `+` `(N ` `-` `1` `) ` `*` `d) ` ` ` ` ` `# Driver code ` `a ` `=` `2` `# starting number ` `d ` `=` `1` `# Common difference ` `N ` `=` `5` `# N th term to be find ` ` ` `# Display the output ` `print` `( ` `"The "` `, N ,` `"th term of the series is : "` `, ` ` ` `Nth_of_AP(a, d, N)) ` ` ` ` ` ` ` `# This code is contributed ` `# by Nikita Tiwari. ` |

*chevron_right*

*filter_none*

## C#

`// C# program to find nth term ` `// of Arithmetic progression ` `using` `System; ` ` ` `class` `GFG ` `{ ` ` ` `public` `static` `int` `Nth_of_AP(` `int` `a, ` ` ` `int` `d, ` ` ` `int` `N) ` ` ` `{ ` ` ` ` ` `// using formula to find the Nth ` ` ` `// term t(n) = a(1) + (n-1)*d ` ` ` `return` `( a + (N - 1) * d ); ` ` ` `} ` ` ` ` ` `// Driver code ` ` ` `public` `static` `void` `Main() ` ` ` `{ ` ` ` `// starting number ` ` ` `int` `a = 2; ` ` ` ` ` `// Common difference ` ` ` `int` `d = 1; ` ` ` ` ` `// N th term to be find ` ` ` `int` `N = 5; ` ` ` ` ` `// Display the output ` ` ` `Console.WriteLine(` `"The "` `+ N + ` ` ` `"th term of the series is : "` `+ ` ` ` `Nth_of_AP(a, d, N)); ` ` ` `} ` `} ` ` ` `// This code is contributed by vt_m. ` |

*chevron_right*

*filter_none*

## PHP

`<?php ` `// PHP Program to find nth term of ` `// Arithmetic progression ` ` ` `function` `Nth_of_AP(` `$a` `, ` `$d` `, ` `$N` `) ` `{ ` ` ` `// using formula to find the ` ` ` `// Nth term t(n) = a(1) + (n-1)*d ` ` ` `return` `(` `$a` `+ (` `$N` `- 1) * ` `$d` `); ` ` ` `} ` ` ` `// Driver code ` ` ` `// starting number ` `$a` `= 2; ` ` ` `// Common difference ` `$d` `= 1; ` ` ` `// N th term to be find ` `$N` `= 5; ` ` ` `// Display the output ` `echo` `(` `"The "` `. ` `$N` `. ` `"th term of the series is : "` `. ` ` ` `Nth_of_AP(` `$a` `, ` `$d` `, ` `$N` `)); ` ` ` `// This code is contributed by Ajit. ` `?> ` |

*chevron_right*

*filter_none*

**Output :**

The 5th term of the series is : 6

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the **DSA Self Paced Course** at a student-friendly price and become industry ready.

## Recommended Posts:

- Nth term where K+1th term is product of Kth term with difference of max and min digit of Kth term
- Ratio of mth and nth term in an Arithmetic Progression (AP)
- Minimize Nth term of an Arithmetic progression (AP)
- Find the Nth term of the series where each term f[i] = f[i - 1] - f[i - 2]
- Find Nth term of the series where each term differs by 6 and 2 alternately
- Arithmetic Progression containing X and Y with least possible first term
- Program for N-th term of Geometric Progression series
- Program to print Arithmetic Progression series
- PHP program to print an arithmetic progression series using inbuilt functions
- Nth term of a sequence formed by sum of current term with product of its largest and smallest digit
- Nth term of given recurrence relation having each term equal to the product of previous K terms
- First term from given Nth term of the equation F(N) = (2 * F(N - 1)) % 10^9 + 7
- Program to get the Sum of series: 1 - x^2/2! + x^4/4! -.... upto nth term
- Program to find Nth term in the given Series
- Program to find the Nth term of the series 3, 7, 13, 21, 31.....
- Program to find Nth term of series 1, 3, 12, 60, 360…
- Program to find the Nth term of series -1, 2, 11, 26, 47......
- Program to find Nth term in the series 0, 0, 2, 1, 4, 2, 6, 3, 8,...
- Program to find Nth term of series 9, 23, 45, 75, 113...
- Program to find Nth term in the series 0, 2, 1, 3, 1, 5, 2, 7, 3,…

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.