Question 448561
 <pre><font face = "consolas" color = "indigo" size = 2><b>

The other tutor didn't give a formula but there is one.

Euler proved that a positive integer N is expressible as the sum 
of the squares of two different integers if and only if in the 
prime factorization of N, every prime number of the form (4k+3),
where k is a positive integer, occurs an even number of times.  
Note that 0 is an even number, so if a prime of the form (4k+3),
where k is a positive integer, doesn't occur at all in the prime 
factorization, then it is considered as occuring an even number 
of times.

The numbers of the form 4k+3 are 

k    4k+3
1      7
2     11 
3     15, not prime
4     19 
5     23
6     27, not prime
7     31
8     35, not prime 

So here is the list of primes of the form 4k+3 
which are less than the numbers in your problem: 

7,11,19,23,31
--------------------------
(a) 13
The prime factorization of 13 is just 13 which contains 
all those in the list 0 times, and 0 is an even number, 
so 13 can be written as the sum of two squares of integers, 
2²+3²=4+9=13 

(b) 17
The prime factorization of 17 is just 17 which contains 
all those in the list 0 times, and 0 is an even number, 
so 17 can be written as the sum of two squares of integers,
1²+4²=1+16=17

(c) 21
The prime factorization of 21 is 3*7 which contains 
7 one time, and 1 is an odd number, so 21 cannot
be written as the sum of two squares of integers.

(d) 29
The prime factorization of 29 is just 29 which contains 
all those in the list 0 times, and 0 is an even number, 
so 29 can be written as the sum of two squares of integers, 
2²+5²=4+25=29

(e) 34
The prime factorization of 34 is just 2*17, but neither 2
nor 17 are in the list of primes of the form 4k+3, so they 
don't matter.  So 34's prime factorization contains all 
those in the list 0 times, and 0 is an even number, so 34 
can be written as the sum of two squares of integers, 
3²+5²=9+25=34

Edwin</pre>