You can take the state number th power of 2 and go on adding this to yield unique number. For reverse mapping you can device the logic as this number will be the sum of the numbers which are perfect power of 2. I leave it for you, as it's your homework.
e.g. (1,2,3) = 2+4+8 = 14