A king asks a learned man to visit his palace, to which the learned man responds:

“I will come some day next month, but I will not tell you on which day. Further, you must give me gold in grams equal to the date on which I come.”

In preparation for the visit, the king demands that his jeweler make gold rings of 1 to 31 grams. The wise jeweler made only 5 rings.

What are their weights?