Given a positive integer N, the task is to find the sum of all the numbers in the Nth row of the below triangle.
6 2 3
10 2 3 4
15 2 3 4 5
Input: N = 2
3 + 2 = 5
Input: N = 3
6 + 2 + 3 = 11
Approach: Taking a closer look at the pattern, it can be observed that a series will be formed as 1, 5, 11, 19, 29, 41, 55, … whose Nth term is (N – 1) + N2.
Below is the implementation of the above approach:
- Sum of all the numbers present at given level in Pascal's triangle
- Triangle of numbers arising from Gilbreath's conjecture
- Sum of all the numbers present at given level in Modified Pascal’s triangle
- Biggest Reuleaux Triangle within a Square which is inscribed within a Right angle Triangle
- Biggest Reuleaux Triangle inscribed within a Square inscribed in an equilateral triangle
- Pascal's Triangle
- Sierpinski triangle
- Trinomial Triangle
- Hosoya's Triangle
- Area of Reuleaux Triangle
- Find all angles of a triangle in 3D
- Find Perimeter of a triangle
- Sierpinski Triangle using Graphics
- Calculate nCr using Pascal's Triangle
- Leibniz harmonic triangle
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.