

One form of   Pythagorean quadruples   is   (for positive integers   a,   b,   c,   and   d):



    a2   +   b2   +   c2     =     d2 


An example:

    22   +   32   +   62     =     72 
 which is:
    4    +   9    +   36     =     49 


Task

For positive integers up   2,200   (inclusive),   for all values of   a,  
b,   c,   and   d,

find   (and show here)   those values of   d   that   can't   be represented.

Show the values of   d   on one line of output   (optionally with a title).



Related tasks

   Euler's sum of powers conjecture. 
   Pythagorean triples.


Reference

   the Wikipedia article:   Pythagorean quadruple.


import math
 
const N = 2_200
 
template isOdd(n: int): bool = (n and 1) != 0
 
var r = newSeq[bool](N + 1)
 
for a in 1..N:
  for b in a..N:
    if a.isOdd and b.isOdd: continue
    let aabb = a * a + b * b
    for c in b..N:
      let aabbcc = aabb + c * c
      d = sqrt(aabbcc.float).int
      if aabbcc == d * d and d <= N: r[d] = true
 
for i in 1..N:
  if not r[I]: stdout.write i, " "
echo()