Find squares n where n+1 is prime: Difference between revisions

Added Easylang
(Added Quackery.)
(Added Easylang)
 
(One intermediate revision by one other user not shown)
Line 471:
</pre>
 
 
=={{header|EasyLang}}==
<syntaxhighlight>
fastfunc isprim num .
i = 2
while i <= sqrt num
if num mod i = 0
return 0
.
i += 1
.
return 1
.
n0 = 1
repeat
n = n0 * n0
until n >= 1000
if isprim (n + 1) = 1
write n & " "
.
n0 += 1
.
</syntaxhighlight>
{{out}}
<pre>
1 4 16 36 100 196 256 400 576 676
</pre>
 
=={{header|F_Sharp|F#}}==
Line 1,283 ⟶ 1,310:
=={{header|Wren}}==
{{libheader|Wren-math}}
<syntaxhighlight lang="ecmascriptwren">import "./math" for Int
 
var squares = []
1,982

edits