Sum of primes in odd positions is prime: Difference between revisions
Content added Content deleted
(Added XPL0 example.) |
mNo edit summary |
||
Line 4: | Line 4: | ||
<br>Let '''p(i)''' be a sequence of prime numbers. |
<br>Let '''p(i)''' be a sequence of prime numbers. |
||
<br>Consider the '''p(1),p(3),p(5), ... ,p(i)''', for each '''p(i) < 1,000''' and '''i''' is odd. |
<br>Consider the '''p(1),p(3),p(5), ... ,p(i)''', for each '''p(i) < 1,000''' and '''i''' is odd. |
||
<br>Let '''sum''' be |
<br>Let '''sum''' be the sum of these primes. |
||
<br>If '''sum''' is prime then print '''p(i)''' and '''sum''' |
<br>If '''sum''' is prime then print '''p(i)''' and '''sum'''. |
||
<br><br> |
<br><br> |