Jump to content

Sequence of primorial primes: Difference between revisions

no edit summary
m (→‎{{header|Phix}}: added syntax colouring the hard way)
No edit summary
Line 2,547:
1 2 3 4 5 6 11 13 24 66 68 75 167 171 172 287 310 352 384 457
</pre>
 
=={{header|Mathematica}} / {{header|Wolfram Language}}==
<lang Mathematica>primorials = Rest@FoldList[Times, 1, Prime[Range[500]]];
primorials = MapIndexed[{{First[#2], #1 - 1}, {First[#2], #1 + 1}} &, primorials];
Select[primorials, AnyTrue[#[[All, 2]], PrimeQ] &][[All, 1, 1]]</lang>
{{out}}
<pre>{1, 2, 3, 4, 5, 6, 11, 13, 24, 66, 68, 75, 167, 171, 172, 287, 310, 352, 384, 457}</pre>
 
=={{header|Nim}}==
1,111

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.