starnumbers
Star numbers are a type of figurate number that represent a centered, regular hexagram (a six-pointed star) drawn on a triangular grid. The first few star numbers are 1, 13, 37, 73, 121, and so on. The formula for the nth star number is given by $S_n = 6n(n-1) + 1$. This formula can also be expressed as $S_n = 3n^2 - 3n + 1$. Alternatively, star numbers can be generated using the formula $S_n = 3 \times P_{n-1} + 1$, where $P_{n-1}$ is the (n-1)th pentagonal number. Another relationship is that the nth star number is equal to 1 plus 6 times the (n-1)th triangular number.
The sequence of star numbers begins with $S_1 = 6(1)(0) + 1 = 1$. For $n=2$, $S_2 = 6(2)(1) + 1