👉 A heptagonal number is a figurate number that represents a polygon with 7 sides. The formula for calculating a heptagonal number, denoted by H_n, is given by:
H_n = n
(n + 1) / 2
Where:
- H_n is the heptagonal number,
- n is the number of sides of the polygon.
For instance, the first few heptagonal numbers are: 7, 14, 21