Sum of two adjacent numbers are primes: Difference between revisions

Line 654:
Ten millionth: 89712345 + 89712346 = 179424691
</pre>
 
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang Mathematica>Column[Row[{Floor[#/2], " + ", Ceiling[#/2], " = ", #}] & /@ Prime[1 + Range[20]]]
Row[{Floor[#/2], " + ", Ceiling[#/2], " = ", #}] &[Prime[10^7 + 1]]</lang>
{{out}}
<pre>1 + 2 = 3
2 + 3 = 5
3 + 4 = 7
5 + 6 = 11
6 + 7 = 13
8 + 9 = 17
9 + 10 = 19
11 + 12 = 23
14 + 15 = 29
15 + 16 = 31
18 + 19 = 37
20 + 21 = 41
21 + 22 = 43
23 + 24 = 47
26 + 27 = 53
29 + 30 = 59
30 + 31 = 61
33 + 34 = 67
35 + 36 = 71
36 + 37 = 73
89712345 + 89712346 = 179424691</pre>
 
=={{header|Perl}}==
1,111

edits