Concatenate two primes is also prime: Difference between revisions

m
→‎J: speedup 3.5 x
(→‎Python: add)
m (→‎J: speedup 3.5 x)
Line 770:
 
=={{header|J}}==
<syntaxhighlight lang="j"> concat =. (] + (* 10 ^ #@":) + ])"1 0
 
_12 ]\ /:~ (#~ 1&p:) , concat/~ p: i. _1 &.(p:inv) 100
23 37 53 73 113 137 173 193 197 211 223 229
233 241 271 283 293 311 313 313 317 317 331 337
559

edits