Write a program which takes an input (which may or may not be prime), and lists the immediate prime following and preceding it.
Shortest program wins. Must execute within 10 seconds on a modern desktop PC. Inputs will be limited to 10,000 maximum.
nfor primality by creating a string
ncharacters long and testing that against a regex absolutely awful? \$\endgroup\$