Getting partition of n into sum by its number