Star Number Calculator

Number Theory

Star number resultYes - 121 is the star number S(5)
FormulaS(k) = 6k(k-1) + 1
Tested value121
Discriminant 24n + 122,916
How this was calculated
  1. The k-th star number is S(k) = 6k(k-1) + 1 - the points of a six-pointed star (hexagram) built from a hexagonal core. The first values are 1, 13, 37, 73, 121.
  2. Setting 6k(k-1) + 1 = 121 gives 6k^2 - 6k + (1 - 121) = 0, whose discriminant is 24n + 12 = 2,916. A star number needs that discriminant to be a perfect square with (6 + root) divisible by 12.
  3. 121 is a star number: it equals S(5) = 6 x 5 x 4 + 1.
  4. Star numbers grow quadratically: S(10) = 541 and S(100) = 59,401. Every star number is also a centred dodecagonal number.

Star numbers count the points in a six-pointed star - the hexagram you get by overlapping two large triangles on a hexagonal core. The k-th star number is S(k) = 6k(k-1) + 1, and the sequence begins 1, 13, 37, 73, 121, 181, 253, 337. They are close relatives of the centred hexagonal numbers, with the star's points adding a second hexagonal layer's worth of dots.

This calculator works in both directions. In test mode it decides whether your number is a star number and, if it is, tells you its index - 121 is S(5). In list mode it enumerates every star number up to your bound: there are 13 of them up to 1,000, the largest being 937. The test is exact algebra, not a lookup: the calculator solves 6k(k-1) + 1 = n and checks whether k comes out whole.

Star numbers also appear under another name - they are exactly the centred dodecagonal (12-gonal) numbers, a coincidence of figurate geometry that surprises everyone who meets it. Whichever name you use, the formula and the sequence are the same.

Worked examples

Test 121 - it is S(5)

(Test a number · 121 · 1000)

Star number resultYes - 121 is the star number S(5)
FormulaS(k) = 6k(k-1) + 1
Tested value121
Discriminant 24n + 122,916

Test 100 - not a star number

(Test a number · 100 · 1000)

Star number resultNo - 100 is not a star number
FormulaS(k) = 6k(k-1) + 1
Tested value100
Discriminant 24n + 122,412

List star numbers up to 1,000

(List numbers up to a bound · 121 · 1000)

Star number result13 star numbers up to 1,000
Largest in range937
FormulaS(k) = 6k(k-1) + 1
Count13

Where the formula comes from

Draw a hexagram in dots. At its heart sits a hexagon of points; around it, six triangular points. If the inner hexagon follows the centred hexagonal pattern with rings of 6, 12, 18 points, the whole figure at stage k contains a hexagonal core plus six triangular arms, and the arithmetic of those pieces collapses neatly into S(k) = 6k(k-1) + 1. The first stage is a single point, S(1) = 1; the second, S(2) = 13, is the first figure that actually looks like a star.

The gaps between consecutive star numbers grow steadily: 12, 24, 36, 48 - each step adds 12 more than the last. That quadratic growth is why the sequence thins out so quickly: 13 values below 1,000, and S(100) is already 59,401. Any figurate family defined by a quadratic does the same, and the star numbers are a clean example to compute with.

How the test works

Testing n means solving 6k^2 - 6k + (1 - n) = 0. The discriminant of that quadratic is 24n + 12, and n is a star number exactly when the discriminant is a perfect square and (6 + its root) divides by 12 to give a whole number k. For 121 the discriminant is 2,916 = 54 squared, k = (6 + 54) / 12 = 5, and indeed S(5) = 121.

For 100 the discriminant is 2,412, which lies between 49 squared and 50 squared - not a square, so no whole k exists and 100 is not a star number. The test never enumerates the sequence, so it stays instant even for large candidates, and the same discriminant idea tests most quadratic figurate families with only the coefficients changed.

The centred dodecagonal coincidence

Centred dodecagonal numbers count points in a 12-sided figure built in rings, with formula 6k(k-1) + 1 - identical to the star numbers. Two genuinely different pictures, a six-pointed star and a twelve-sided polygon, generate the same counts at every stage. Figurate number theory is full of these collisions, and they are usually only noticed when someone computes both sequences and finds them equal term by term.

The OEIS files them together as A003154. Practically, it means results transfer: anything proven about centred dodecagonal numbers - congruences, generating functions, which primes appear - is automatically a theorem about star numbers, and the calculator's answers agree with both literatures.

Star versus centred hexagonal numbers

The centred hexagonal numbers H(k) = 3k(k-1) + 1 - 1, 7, 19, 37, 61 - share the star numbers' core but not their points. Compare the formulas and the relationship is exact: S(k) = 2 x H(k) - 1. The star is, arithmetically, two hexagonal layers fused at the centre point. You can see it in the sequences: 37 appears in both (it is S(3) and H(4)), but 73 is a star number and not a centred hexagonal number, while 61 is the reverse.

That factor of two is a useful cross-check on hand calculations, and a good reminder that figurate families are best told apart by their formulas rather than their first few terms, which overlap deceptively often.

Listing and counting

List mode simply evaluates S(k) for k = 1, 2, 3, ... and keeps the values within your bound. Up to 1,000 there are 13: 1, 13, 37, 73, 121, 181, 253, 337, 433, 541, 661, 793 and 937. Because the gaps grow by 12 each time, the count up to a bound B grows like the square root of B - doubling the bound never doubles the count.

If you are checking a table from a book or a website, the gap pattern is the fastest audit: subtract neighbours and confirm the differences rise by exactly 12. A single transcription error anywhere in the list breaks that pattern at two adjacent gaps, which makes the star numbers unusually easy to proofread.

Where star numbers show up

Beyond figurate geometry, star numbers appear in the study of the Star of David theorem in Pascal's triangle - the products of binomial coefficients at a hexagram's points balance in a way first noticed in the 1970s - and in recreational contexts from board layouts to the six-pointed star's long cultural history as a drawn figure.

Mostly, though, they earn their keep as a teaching example: a sequence with a picture you can draw, a formula you can derive, a test you can do with one discriminant, and a secret identity as another sequence entirely. That is a lot of mathematics in 6k(k-1) + 1.

Primes among the star numbers

Some star numbers are prime: 13, 37, 73, 181, 337, 433, 541, 661 and 937 from the list below 1,000. Others factor instructively - 121 is 11 squared, 253 is 11 x 23, 793 is 13 x 61. Whether infinitely many star numbers are prime is unknown, as with most quadratic sequences; the values thin out quadratically while primes thin out logarithmically, so prime star numbers should keep appearing, ever more sparsely, if the standard heuristics are right.

The calculator does not test primality - its question is membership in the sequence - but the factorisations above make a pleasant hand-check of the list mode's output: multiply any claimed composite back together and compare with the sequence value.

A recurrence for fast listing

Successive star numbers obey S(k+1) = S(k) + 12k: each step adds twelve times the current index. Starting from S(1) = 1, the additions run 12, 24, 36, 48 - the same growing gaps the main text noted - and the whole sequence below any bound can be generated by repeated addition without a single multiplication. The closed formula and the recurrence are two views of one object, and list mode's output satisfies both.

Recurrences like this are how sequence databases are audited in practice: generate by the recurrence, generate by the formula, and diff the results. Agreement is not a proof, but it is the kind of redundancy that catches the transcription errors which plague printed tables.

The Star of David theorem

The Pascal's triangle connection deserves its own paragraph. Take the six binomial coefficients at the points of a hexagram drawn in Pascal's triangle around a central entry. The Star of David theorem says the products of the two alternating triples are equal - a balance as unexpected as the star numbers' identity with the centred dodecagonal numbers, and a relative of the same hexagonal symmetry.

It is a fitting companion result for this page: the hexagram keeps generating arithmetic coincidences, in dot patterns, in binomial coefficients and in figurate sequences, because sixfold symmetry is woven deeply into the combinatorics of the plane.

One more test, worked in full

Take 337. The discriminant is 24 x 337 + 12 = 8,100, which is 90 squared exactly. Then k = (6 + 90) / 12 = 8, a whole number, so 337 is a star number - and indeed S(8) = 6 x 8 x 7 + 1 = 337. The neighbour 253 fails the primality question but passes membership: its discriminant is 24 x 253 + 12 = 6,084 = 78 squared, giving k = 7, and S(7) = 253 = 11 x 23, a composite star number.

These two neighbours summarise the page: membership is a discriminant away, primality is a separate question entirely, and the sequence happily contains both kinds. If you test one number after reading this page, make it 337 - the arithmetic is clean enough to do on an envelope, which is more than most sequences offer.

FAQs

What is a star number?

A figurate number S(k) = 6k(k-1) + 1 counting the points in a six-pointed star pattern. The sequence runs 1, 13, 37, 73, 121, 181 and so on.

Is 121 a star number?

Yes - 121 is S(5), the fifth star number: 6 x 5 x 4 + 1 = 121.

How many star numbers are there up to 1,000?

13, running from 1 to 937.

How does the calculator test a star number?

It solves 6k(k-1) + 1 = n. The number qualifies exactly when the discriminant 24n + 12 is a perfect square and (6 + root) / 12 is a whole number.

What is the 10th star number?

S(10) = 541. The 100th is 59,401.

Are star numbers the same as centred dodecagonal numbers?

Yes - the two sequences are identical, term for term, although the figures they count look completely different.

What is the relation to centred hexagonal numbers?

S(k) = 2 x H(k) - 1: a star number is twice the same-index centred hexagonal number, minus the shared centre point.

Is 100 a star number?

No. Its discriminant, 2,412, is not a perfect square, so no whole number k satisfies the formula.

Sources

Related calculators

Correlation Coefficient Calculator
Pearson's r for up to six paired observations, with r² and the deviation sums shown — the full workings, not just the headline number.
Logit Calculator
The logit of a probability: the natural log of the odds, the scale on which logistic regression is linear.
Spherical Cap Calculator
The volume and curved surface of a sphere sliced by a plane — from the sphere's radius and the cap's height, with its share of the whole sphere.