A Regular Expression to Check for Prime Numbers

The famous trick of testing whether a number is prime using nothing but a regular expression on a string of ones, explained step by step with a small demonstration.

Tonble
Share X Reddit Bluesky Email
Screenshot of noulakaz.net

Stumble onto more like this

One click takes you to a page you didn't know you were looking for. Rate it and the next one lands closer to your taste.

Add to Browser — it's free

Works in Chrome, Edge and Brave. No account needed.