Numbers which are not the sum of distinct squares: Difference between revisions
Content added Content deleted
m (→{{header|Phix}}: maybe 2*n+3) |
|||
Line 47: | Line 47: | ||
using Combinatorics |
using Combinatorics |
||
squares = [n * n for n in 1:20] |
|||
possibles = [n for n in 1:500 if all(combo -> sum(combo) != n, combinations(squares))] |
possibles = [n for n in 1:500 if all(combo -> sum(combo) != n, combinations(squares))] |