Given a number N, the task is to check if N is a Pentadecagon Number or not. If the number N is an Pentadecagon Number then print “Yes” else print “No”.
Pentadecagon Number is a 15-sided polygon..The first few Pentadecagon numbers are 1, 15, 42, 82, 135, 201, …
Input: N = 15
Second Pentadecagon number is 15.
Input: N = 30
- The Kth term of the Pentadecagon number is given as
- As we have to check that the given number can be expressed as a Pentadecagon Number or not. This can be checked as:
- If the value of K calculated using the above formula is an integer, then N is a Pentadecagon Number.
- Else N is not a Pentadecagon Number.
Below is the implementation of the above approach:
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
- Program to check if N is a Centered Pentadecagonal Number
- Pentadecagonal Number
- Centered Pentadecagonal Number
- Find the sum of the first Nth Centered Pentadecagonal Number
- Program to check whether a number is Proth number or not
- Program to check if N is a Icosihenagonal number
- Program to check if N is a Icositrigonal number
- Program to check if N is a Tridecagonal Number or not
- Program to check if N is a Heptadecagonal Number
- Program to check if N is a Icosagonal Number
- Program to check if N is a Icositetragonal number
- Program to check if N is a Icosidigonal Number
- Program to check if N is a Dodecagonal Number
- Program to check if N is a Hexagonal Number or not
- Program to check if N is a Myriagon 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 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.