A004440 Numbers that are not the sum of 3 distinct nonzero squares.
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 27, 28, 31, 32, 33, 34, 36, 37, 39, 40, 43, 44, 47, 48, 51, 52, 55, 57, 58, 60, 63, 64, 67, 68, 71, 72, 73, 76, 79, 80, 82, 85, 87, 88, 92, 95, 96, 97, 99, 100, 102, 103, 108, 111, 112, 119, 123, 124, 127, 128, 130, 132, 135, 136, 143, 144, 148, 151, 156, 159, 160, 163, 167, 172, 175, 176
Offset: 1
Keywords
Links
Crossrefs
Cf. A004432 (complement).
Programs
-
Maple
N:= 1000: # to get all terms <= N V:= Vector(N): for x from 1 to floor(sqrt(N/3)) do for y from x+1 to floor(sqrt((N-x^2)/2)) do zs:= [$(y+1).. floor(sqrt(N-x^2-y^2))]; V[map(z -> x^2 + y^2 + z^2, zs)]:= 1; od od: select(i -> V[i] = 0, [$1..N]); # Robert Israel, Dec 31 2015
Comments