Jump to content

Next special primes: Difference between revisions

Added Easylang
m (→‎{{header|Wren}}: Minor tidy)
(Added Easylang)
 
Line 380:
887 967 80
967 1049 82
</pre>
 
=={{header|EasyLang}}==
{{trans|11l}}
<syntaxhighlight>
fastfunc isprim num .
i = 2
while i <= sqrt num
if num mod i = 0
return 0
.
i += 1
.
return 1
.
p = 3
i = 2
write "2 3 "
while p + i < 1050
if isprim (p + i) = 1
p += i
write p & " "
.
i += 2
.
</syntaxhighlight>
{{out}}
<pre>
2 3 5 11 19 29 41 59 79 101 127 157 191 227 269 313 359 409 461 521 587 659 733 809 887 967 1049
</pre>
 
2,043

edits

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