Find all integers 1<=k<=169 for which 169 is not the sum of k nonzero squares.
The squares are not necessarily unique. For example k=5: 169=1+4+4+16+144.
This should be done without a brute force program.
k=1 1*169
k=2 1*144 + 1*25
k=3 1*144 + 1*16 + 1*9
k=4 1*100 + 1*49 + 1*16 + 1*4
k=5 2*64 + 1*36 + 1*4 + 1*1
k=6 2*81 + 1*4 + 3*1
k=7 2*64 + 1*25 + 4*4
k=8 2*64 + 1*36 + 5*1
k=9 2*81 + 7*1
k=10 2*64 + 1*25 + 3*4 + 4*1
k=11 2*64 + 1*16 + 1*9 + 3*4 + 4*1
With 100 = 64 + 36, 25 = 16 + 9, 9 = 4 + 4 + 1 it looks as though I should be able to get all values of k up to 149 (see previous entry). Leaving 150, 153, 156, 159, 162, 164, 165, 167 & 168 as values of k I can't find.
|
Posted by Nosher
on 2004-11-04 22:59:44 |