If we order all the partitions of a integer in a lexicographic order, how can we compute the position of each partition in this order without having to explicitly list all other partitionpartitions that precedes it. How is the modification done when we restrict the maximum part and the number of partitionpartitions? I am would like to use these indices in database search. It would be helpful even if we get a closed form formula when the number of parts is restricted to small number, for example $<15$ and the integer is $< 100$ with each part $<5$.