We show that counting different configurations that give rise to black-hole entropy in loop quantum gravity is related to partitions in number theory.