Sharp bounds for the partition function of integer sequences