The Braden Files
Curiosities of mathematics, history, parachuting, etc...
Wednesday, August 11, 2010
A test for primality, using regular expressions
/^1?$|^(11+?)\1+$/
That's it
!
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment