Starting again in ruby
Generating permutations in a hacky
Calculate which k a set of numbers produce a solution
Hacky solution for small upper bound