A hexagonal pyramidal number is a pyramidal number formed by adding the first few hexagonal numbers. The first few of these numbers are:
The nth number in this sequence is given by the formula