Primes whose first and last number is 3: Difference between revisions

→‎J: speedup 20x, add stretch goal
(→‎J: add)
(→‎J: speedup 20x, add stretch goal)
Line 596:
 
=={{header|J}}==
<syntaxhighlight lang="j"> primes3x3=. 3 ;@; 10 <@(#~ 1&p: )@(30&*. '3' = {.@":"0)+ 3 + 10 * i.)@^ 1000i.
 
3 313 353 373 383 3023 3083 3163 3203 3253 3313 3323 3343 3373 3413 3433 3463 3533 3583 3593 3613 3623 3643 3673 3733 3793 3803 3823 3833 3853 3863 3923 3943</syntaxhighlight>
primes3x3 3
3 313 353 373 383 3023 3083 3163 3203 3253 3313 3323 3343 3373 3413 3433 3463 3533 3583 3593 3613 3623 3643 3673 3733 3793 3803 3823 3833 3853 3863 3923 3943</syntaxhighlight>
 
# primes3x3 5
2251</syntaxhighlight>
 
=={{header|jq}}==
559

edits