For starters, I will explain that a triangle number is any number X, such that if X dots were aranged in a a shape the first row would have one dot, the second two dots, the third three and so on, forming a triangular shape.

The first few triangle numbers are 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120. In other words you start by adding one, then two then, three etc. The formula for these is (n(n+1))/2.

Next square numbers which we learn as N squared. But they can also be expressed as ((n(n+1))/2) + ((n(n-1))/2). Here the first few are: 1, 4 ,9 ,16, 25, 36, 49. In this case, instaed of adding 1 then 2 then 3 you add 1 then 3 then 5 then 7 (i.e. every other number).

Next are pentagonal numbers which are also comprised of dots where the Nth pentagonal number is the number of dots in the figure. The first few are: 1, 5, 12, 22, 35, 51. Notice how first you add 1 then 4 then 7 then 10 then 13 (i.e. every third number). The formula is ((n(n+1))/2) + ((2)(n(n-1))/2).