Doubly triangular number

There are 21 colorings of the four corners of a square using three colors (up to symmetry), a doubly triangular number, formed by combining two of the six colorings of two opposite corners

In mathematics, the doubly triangular numbers are the numbers that appear within the sequence of triangular numbers, in positions that are also triangular numbers. That is, if denotes the th triangular number, then the doubly triangular numbers are the numbers of the form .