I have used Linux Permissions system table which uses 4 numbers, 0, 1, 2, 4 By summing up these 4 numbers you can get permissions for Users, Groups and Other(UGO). It can be 0, 1, 2, 3, 4, 5, 6, 7 for Users, for Groups and Other
For example UGO=755 equals to this table:
7 5 5
r: 1 1 1
w: 2 0 0
x: 4 4 4
r - read permission,
w - write permission,
x - execute permission,
UGO = 755 tells me, Users have rwx permissions, Group and Others have only read and write permissions.
I like this maths stuff as i can ease my work in generating data report. The problem is, I have 80 columns and 18000 rows. In each of the 80 columns I can add single value from the set [1, 80]. To save me some time and prevent, creating many helper tables, I want to sum up all the values in these 80 columns into one single number. But at any time I want to be able to decode this single number into the chosen values from the set [1, 80].
Which numbers would follow next? For example i know, next would be 7, so: 0, 1, 2, 4, 7 gives me the sums in the set [0, 13].
Does this sort of things has some name in maths?
How can I determine the next numbers?
You can use $1,2,4,8,16,32,64$ to add up to all numbers from $0$ to $127$. As mentioned in the comments, these are the first powers of $2$. It works because the sum of all the powers of $2$ up to $2^n$ is $2^{n+1}-1$ so the next number you need is $2^{n+1}$. You need at least $7$ numbers in the set to get more than $64$ choices. If you make the late numbers smaller, you can reduce the maximum sum. Making it $27$ will make the maximum sum $80$, but you will have multiple ways to reach certain sums.