Numbers which are not the sum of distinct squares: Difference between revisions
Numbers which are not the sum of distinct squares (view source)
Revision as of 06:59, 24 November 2021
, 2 years ago→{{header|Julia}}
Line 49:
@show squares = [n * n for n in 1:20]
possibles = [n for n in 1:500 if all(combo -> sum(combo) != n, combinations(squares))]
println(possibles)
|