$N$ is an integer. We need to write $N$ as a sum of $K$ integers (not necessarily distinct) such that by adding some(or all) of the integers we can get every integer in $[1,N]$.What is the minimum value of $K$?
e.g. $N=7$ here we can write $7$ as a sum of $3$ integers $(1+2+4=7)$. And...
$1, 2, 1+2=3, 4, 4+1=5, 4+2=6, 1+2+4=7$ every integer less than equal to $7$ can be expressed by adding these integers. So minimum value of $K$ is $3$.
Doing this for small integers I guessed a solution that the minimum value of $K$ will be the length of binary representation of $N$. But I am unable find why this is the case.