Given an integer n, find the nth Centered pentagonal number.
A Centered Pentagonal Number is a centered figurate number that represents a pentagon with a dot in the centre and other dots surrounding it in pentagonal layers successively [ Source: Wiki ]
Few Centred pentagonal Number are :
1, 6, 16, 31, 51, 76, 106, 141, 181, 226, 276, 331, 391………………..
Input : 3 Output : 16 Input : 9 Output : 181
Centered pentagonal for n-th term is given by :
Basic implementation of the above approach :
7th Centered pentagonal number: 106
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.
- Program to check if N is a Centered Pentagonal Number or not
- Find the sum of the first N Centered Pentagonal Number
- n'th Pentagonal Number
- Program to check if N is a Pentagonal Number
- Pentagonal Pyramidal Number
- Program to find volume and surface area of pentagonal prism
- Find all numbers up to N which are both Pentagonal and Hexagonal
- Second Pentagonal numbers
- Centered cube number
- Centered Dodecagonal Number
- Centered hexagonal number
- Program for centered nonagonal number
- Centered Octadecagonal Number
- Centered triangular number
- Centered tetrahedral number
- Centered heptagonal number
- Program for Centered Icosahedral Number
- Centered Square Number
- Centered Octahedral number
- Centered Octagonal Number
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.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.