Primes: n*2^m+1: Difference between revisions
Content added Content deleted
(→{{header|ALGOL 68}}: blurb tweak) |
(J) |
||
Line 468: | Line 468: | ||
Sleep</syntaxhighlight> |
Sleep</syntaxhighlight> |
||
=={{header|J}}== |
|||
<syntaxhighlight lang=J style="height: 20em; overflow: scroll"> ' n m prime',":(,.1+(*2^])/@|:)(,.~#\)i.&1"1]1 p:1+(1+i.45) */ 2^i.9 |
|||
n m prime |
|||
1 0 2 |
|||
2 0 3 |
|||
3 1 7 |
|||
4 0 5 |
|||
5 1 11 |
|||
6 0 7 |
|||
7 2 29 |
|||
8 1 17 |
|||
9 1 19 |
|||
10 0 11 |
|||
11 1 23 |
|||
12 0 13 |
|||
13 2 53 |
|||
14 1 29 |
|||
15 1 31 |
|||
16 0 17 |
|||
17 3 137 |
|||
18 0 19 |
|||
19 6 1217 |
|||
20 1 41 |
|||
21 1 43 |
|||
22 0 23 |
|||
23 1 47 |
|||
24 2 97 |
|||
25 2 101 |
|||
26 1 53 |
|||
27 2 109 |
|||
28 0 29 |
|||
29 1 59 |
|||
30 0 31 |
|||
31 8 7937 |
|||
32 3 257 |
|||
33 1 67 |
|||
34 2 137 |
|||
35 1 71 |
|||
36 0 37 |
|||
37 2 149 |
|||
38 5 1217 |
|||
39 1 79 |
|||
40 0 41 |
|||
41 1 83 |
|||
42 0 43 |
|||
43 2 173 |
|||
44 1 89 |
|||
45 2 181 </syntaxhighlight> |
|||
=={{header|Julia}}== |
=={{header|Julia}}== |
||
<syntaxhighlight lang = "julia">""" Rosetta code task: rosettacode.org/wiki/Primes:_n*2%5Em%2B1 """ |
<syntaxhighlight lang = "julia">""" Rosetta code task: rosettacode.org/wiki/Primes:_n*2%5Em%2B1 """ |