Ormiston pairs: Difference between revisions
Content added Content deleted
(Added Easylang) |
|||
Line 624: | Line 624: | ||
=={{header|EasyLang}}== |
=={{header|EasyLang}}== |
||
<syntaxhighlight> |
<syntaxhighlight> |
||
maxn = 1000000 |
|||
fastfunc isprim num . |
|||
len isdiv[] maxn |
|||
⚫ | |||
proc sieve . . |
|||
while i <= sqrt num |
|||
max = sqrt len isdiv[] |
|||
⚫ | |||
for d = 2 to max |
|||
⚫ | |||
for i = d * d step d to len isdiv[] |
|||
⚫ | |||
⚫ | |||
. |
. |
||
⚫ | |||
. |
. |
||
isdiv[] &= 0 |
|||
. |
. |
||
sieve |
|||
func nextprim n . |
|||
repeat |
repeat |
||
n += 1 |
n += 1 |
||
until |
until isdiv[n] = 0 |
||
. |
. |
||
return n |
return n |