Numbers which are not the sum of distinct squares: Difference between revisions
Content added Content deleted
Line 49: | Line 49: | ||
@show squares = [n * n for n in 1:20] |
@show squares = [n * n for n in 1:20] |
||
possibles = [n for n in 1:500 if all(combo -> sum(combo) != n, |
possibles = [n for n in 1:500 if all(combo -> sum(combo) != n, combinations(squares))] |
||
combinations(squares))] |
|||
println(possibles) |
println(possibles) |