Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Unprimeable-numbers/J/unprimeable-numbers.j
Normal file
11
Task/Unprimeable-numbers/J/unprimeable-numbers.j
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
NB. replace concatenates at various ranks and in boxes to avoid fill
|
||||
NB. the curtailed prefixes (}:\) with all of 0..9 (i.10) with the beheaded suffixes (}.\.)
|
||||
NB. under the antibase 10 representation (10&#.inv)
|
||||
replace=: ([: ; <@}:\ ,"1 L:_1 ([: < (i.10) ,"0 1 }.)\.)&.(10&#.inv)
|
||||
|
||||
NB. primable tests if one of the replacements is prime
|
||||
primable=: (1 e. 1 p: replace)&>
|
||||
|
||||
unprimable=: -.@:primable
|
||||
|
||||
assert 0 1 -: unprimable 193 200
|
||||
Loading…
Add table
Add a link
Reference in a new issue