summaryrefslogtreecommitdiff
path: root/euler41.sh
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-05-24 21:39:58 +0800
committerIru Cai <mytbk920423@gmail.com>2018-05-24 21:39:58 +0800
commit1eefd58ca4fdb5d2f51f657bfd70c9a89a4707db (patch)
treeabde0e4da3c7fe138f3874a94d8eb7d0e44c3224 /euler41.sh
downloadproject_euler-1eefd58ca4fdb5d2f51f657bfd70c9a89a4707db.tar.xz
initial commit
Diffstat (limited to 'euler41.sh')
-rw-r--r--euler41.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/euler41.sh b/euler41.sh
new file mode 100644
index 0000000..133d894
--- /dev/null
+++ b/euler41.sh
@@ -0,0 +1,3 @@
+# Pandigital prime is at most 7 digits, because 1+...+8 and 1+...+9 is multiply of 3
+for i in 76{1..5}{1..5}{1..5}{1..5}{1,3,5} ; do factor $i; done | sed -e '/[0-9] /d' | cut -d':' -f1 \
+ | sed $(for i in {1..7} ; do printf '\x2de /%d.*%d/d ' $i $i ; done)