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
- 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
- Count number of triplets with product equal to given number with duplicates allowed
- 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
- Number of possible permutations when absolute difference between number of elements to the right and left are given
- Check if a number is divisible by all prime divisors of another number
- Find the number of jumps to reach X in the number line from zero
- Find the maximum number of composite summands of a number
- Find count of digits in a number that divide the number
- Count the number of operations required to reduce the given number
- Find the largest good number in the divisors of given number N
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.