Sum of primes in odd positions is prime: Difference between revisions
Sum of primes in odd positions is prime (view source)
Revision as of 20:23, 31 January 2023
, 1 year agoadjusted task description to fit solutions
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
(adjusted task description to fit solutions) |
||
Line 2:
;Task:
<br>Let '''p(i)''' be a sequence of prime numbers. such that 2=p(1), 3=p(2), 5=p(3), ...
<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>If '''sum''' is prime then print '''i''', '''p(i)''' and '''sum'''.
|