user
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.
assistant
(formerly Perl 6)

**Works with**: Rakudo version 2018.09

```
my \N = 2200;
my @sq = (0 .. N)»²;
my @not = False xx N;
@not[0] = True;

(1 .. N).race.map: -> $d {
    my $last = 0;
    for $d ... ($d/3).ceiling -> $a {
        for 1 .. ($a/2).ceiling -> $b {
            last if (my $ab = @sq[$a] + @sq[$b]) > @sq[$d];
            if (@sq[$d] - $ab).sqrt.narrow ~~ Int {
                @not[$d] = True;
                $last = 1;
                last
            }
        }
        last if $last;
    }
}

say @not.grep( *.not, :k );

```

Output:

```
(1 2 4 5 8 10 16 20 32 40 64 80 128 160 256 320 512 640 1024 1280 2048)
```