Pythagorean quadruples: Difference between revisions

Added Easylang
(Added solution for EDSAC)
(Added Easylang)
 
Line 665:
<pre>The values of d <= 2200 which can't be represented:
1 2 4 5 8 10 16 20 32 40 64 80 128 160 256 320 512 640 1024 1280 2048</pre>
 
=={{header|EasyLang}}==
{{trans|Nim}}
<syntaxhighlight>
n = 2200
n2 = n * n * 2
len r[] n
len ab[] n2
for a = 1 to n
a2 = a * a
for b = a to n
ab[a2 + b * b] = 1
.
.
s = 3
for c = 1 to n
s1 = s
s += 2
s2 = s
for d = c + 1 to n
if ab[s1] = 1
r[d] = 1
.
s1 += s2
s2 += 2
.
.
for i to n
if r[i] = 0
write i & " "
.
.
</syntaxhighlight>
{{out}}
<pre>
1 2 4 5 8 10 16 20 32 40 64 80 128 160 256 320 512 640 1024 1280 2048
</pre>
 
=={{header|EDSAC order code}}==
2,069

edits