Skip to content

Prime Hunter

Find every prime in a fixed number grid before three composite picks end the hunt.

Privacy: your files never leave your device. All processing happens locally in your browser.

How to use

  1. 1.Move across the twelve-number grid with the arrow keys and inspect the selected integer.
  2. 2.Press Space or Enter to test it; find primes while avoiding three distinct composites.
  3. 3.Select 2, 5, 11, 17, 23, and 29 with no mistakes to finish at 880 points.

About Prime Hunter

Prime Hunter turns prime recognition into a compact three-by-four keyboard game. The board contains twelve unique integers from 2 through 33. Exactly six are prime. Move the visible cursor, test a number, and find all six before three distinct composite choices end the run.

A prime is an integer greater than one with exactly two positive divisors: one and itself. This page follows that standard definition rather than treating odd numbers as automatically prime. The implementation tests possible divisors only while the divisor squared is no greater than the candidate, which is sufficient because a composite number must have at least one factor at or below its square root.

The fixed board is 2, 4, 5, 9, 11, 15, 17, 21, 23, 25, 29, and 33. Its six targets are 2, 5, 11, 17, 23, and 29. Wolfram MathWorld supplies the mathematical definition, while OEIS A000040 independently lists those prime values in sequence. Eight external golden cases cover the boundary at one, small primes, even and odd composites, a square composite, and 29.

Use the arrow keys to move among four columns and three rows. Press Space or Enter to test the selected cell. Mouse and touch players can click the same numbered buttons. A correct prime changes to the found state. A composite changes to the rejected state and consumes one strike. Testing an already resolved cell is a harmless no-op, so the same composite cannot unfairly consume multiple strikes.

A clean solution selects cell indices 0, 2, 4, 6, 8, and 10, corresponding to the six verified primes. Each new test counts as one attempt. The score starts at 1,000, subtracts 20 per distinct test, and subtracts another 100 for each composite mistake. Six clean prime selections therefore complete the board at 880 points.

The failure path is equally reproducible. Select 4, 9, and 15, or any three distinct composites, and the third mistake creates a terminal deadlock. No further arrow or test action can change the result until Restart. This makes failure observable and testable instead of presenting a warning that the player can silently ignore.

The pure logic test verifies all eight external classifications, the twelve-row and uniqueness invariants, the exact six-prime set, the full six-selection winning simulation, the 880 score, the three-composite deadlock, repeated-cell protection, terminal-state freezing, and cursor boundaries. Expected prime values come from the cited sources rather than being derived from the function under test.

The interface is a semantic CSS grid of buttons, not a canvas. Found, rejected, current, surface, border, focus, and warning states use the site's CSS variables. Every cell announces its value and resolved state to assistive technology. There is no timer, animation dependency, audio, account, network request, random service, hardware permission, or pointer-only gesture.

Restart restores the cursor to 2, clears all found and rejected cells, returns the score to 1,000, and resets the three-strike counter. A completed best score is stored only in this browser. Double-press Escape to display the shared simulated spreadsheet boss screen, then repeat the gesture to resume the unchanged board. For more number practice, continue with Number Sequence Quiz, Magic Square, Math Maze, or Number Match 10.

Methodology & sources

The board contains twelve unique fixed integers. isPrime rejects nonintegers and values below two, then checks divisors through the square-root boundary. State tracks cursor, found cells, rejected cells, attempts, mistakes, score, completion, and deadlock. Six found primes complete; three distinct composites deadlock; score is max(0, 1000 − 20×attempts − 100×mistakes).

Frequently asked questions

Is 1 a prime number?
No. A prime is greater than one and has exactly two positive divisors, while 1 has only one.
Why is 25 rejected?
Twenty-five is composite because 5 × 5 = 25, so it has divisors other than 1 and itself.
Can the same wrong cell take two strikes?
No. Once a composite is rejected, testing that resolved cell again does nothing.
How is the clean score calculated?
The game subtracts 20 for each distinct test. Six correct tests from 1,000 produce 880 points.

Mini Games guides

View all