After reading a bit in Meta and the help section, I'm still not sure whether this qualifies as a "good" puzzle in the spirit of the site, but the votes will show - I liked it when I encountered it, and maybe others will enjoy it as well.
The goal of this puzzle is to find a set of 17 numbers between 0 and 100, so that every number between 0 and 100 can be written as the sum of two of these numbers.
The limits of 0 and 100 are both inclusive, so there are 101 sums to be constructed. The sums may involve the same number twice. So obviously, 0 must be part of the solution, as 0 = 0 + 0 is the only way of obtaining 0 as one sum.
As an example, a solution might look like
{ 0, 1, 3, ..., 49, 51 }
0 = 0 + 0
1 = 1 + 0
2 = 1 + 1
3 = 3 + 0
4 = 3 + 1
5 = ...
...
99 = ...
100 = 49 + 51
A warning:
You will easily find solutions with 18 numbers, or 17 numbers that give 95 of the required sums. But finding a valid solution is really, really hard. I have to admit that I did not manage to manually find such a solution. Instead, I wrote a program to solve it.
Therefore the use of computers, programs or tools of any kind is explicitly encouraged.
In hindsight, might also have been possible to derive a solution manually. But it is difficult, regardless of whether someone considers it as a brainteaser or a programming challenge.
Update with Hints 0 and 1:
Hint 0: As already mentioned above, finding solutions that are "nearly complete" is far easier than finding an actual solution. This does not necessarily mean that it is trivial to manually find a solution, e.g. one that gives 95 sums or uses 18 numbers. It just means that there are far more such solutions. As per request in the comments (and as already posted in the chat), one solution with 18 numbers is
[0, 1, 2, 3, 4, 5, 10, 16, 22, 28, 34, 40, 41, 45, 48, 49, 50, 82]
But one should not expect a 17-number-solution to be "similar" to that in any way.
Hint 1: One could imagine different approaches for solving this:
- Starting with a solution that gives the desired 101 sums, but uses more than 17 numbers, and trying to reduce the number of numbers step by step
- Starting with a solution that uses 17 numbers, but does not give all 101 sums, and modifying the numbers step by step
- A hybrid method of building the list of numbers and checking the resulting sums in parallel, adding and removing numbers as necessary (as some sort of "backtracking")
It's hard to say which approach is more promising when trying to solve it manually. The hybrid one seems to be the most "controllable" and easiest to wrap the head around when trying to solve it manually (but as I mentioned: I did not succeed with this when I tried it). For the program that I eventually wrote, I used the second approach: Starting with 17 "reasonable" numbers, and modifying them, step by step, trying to fill the gaps in the list of sums.
There is another Hint 2 that refers to one particular solution, but I think that it will make it much easier to find this solution, so I'll wait with this one until tomorrow.
(Another remark: There are problems that look somewhat similar to this one. For example, the problem of finding a Sparse Ruler. Maybe someone finds this interesting as an entry point, although it will not necessarily help to solve this puzzle)