summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--problem58.ijs5
1 files changed, 5 insertions, 0 deletions
diff --git a/problem58.ijs b/problem58.ijs
new file mode 100644
index 0000000..194d448
--- /dev/null
+++ b/problem58.ijs
@@ -0,0 +1,5 @@
+limit =: 20000
+corners =: +/\1,4#2*1+i.limit
+primeCounts =: +/\0,+/"1]1 p: (limit,4)$}.corners
+primeRatios =: primeCounts % 1+4*i.limit+1
+problem58 =: 1+2*1{I.primeRatios<0.1