Created
March 6, 2013 18:41
-
-
Save jld/5101869 to your computer and use it in GitHub Desktop.
357686312646216567629137
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| thing() { | |
| local stem=$1 found=false | |
| for d in 1 2 3 4 5 6 7 8 9 | |
| do local p=$d$stem | |
| if [ $(factor $p | wc -w) -ne 2 ] | |
| then continue | |
| fi | |
| found=true | |
| thing $p || echo $p | |
| done | |
| $found | |
| } | |
| thing | awk '{print length,$1}' | sort -n | cut -d\ -f2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment