Given a number n, the task is to find Nth heptagonal number. A Heptagonal number represents heptagon and belongs to a figurative number. Heptagonal has seven angles, seven vertices, and seven-sided polygon.
Input : 2
Few Heptagonal numbers are :
1, 7, 18, 34, 55, 81, 112, 148, 189, 235………..
A formula to calculate Nth Heptagonal number:
- Centered heptagonal number
- Count number of triplets with product equal to given number with duplicates allowed
- Find minimum number to be divided to make a number a perfect square
- Count number of trailing zeros in Binary representation of a number using Bitset
- Smallest number dividing minimum number of elements in the array | Set 2
- Largest number dividing maximum number of elements in the array
- Smallest number dividing minimum number of elements in the Array
- Number of possible permutations when absolute difference between number of elements to the right and left are given
- Given number of matches played, find number of teams in tournament
- Find the number of positive integers less than or equal to N that have an odd number of digits
- Number of times the largest perfect square number can be subtracted from N
- Number of ways to split a binary number such that every part is divisible by 2
- Build Lowest Number by Removing n digits from a given number
- Find the smallest number whose digits multiply to a given number n
- Minimum number of given powers of 2 required to represent a 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.