diff options
author | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2021-08-27 17:10:33 +0200 |
---|---|---|
committer | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2021-08-27 17:10:33 +0200 |
commit | a3ebe0395897c8e3928c4c68aa937bab75ea6006 (patch) | |
tree | 19ff9057cea199be7fa604a2b2cde5edaad393da | |
parent | 2644b21807b33bc10374b077da61c1a95d4b76c2 (diff) |
Problem 27
-rw-r--r-- | problem27.ijs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/problem27.ijs b/problem27.ijs new file mode 100644 index 0000000..f4d5d47 --- /dev/null +++ b/problem27.ijs @@ -0,0 +1,16 @@ +seq =: dyad define "0 + n =. 0 + primes =. 0 + while. 1 p: y+(n*x)+n*n do. + n =. n+1 + primes =. primes+1 + end. + primes +) + +max =: 1000 +range =: max-~i.>:max*2 +tab =: seq/~range +rowIx =: {. \: >./"1 tab +colIx =: {. \: rowIx { tab +problem27 =: */range{~rowIx,colIx |