The n-th k-gonal number I was doing some school work and got bored so I started messing with k-gonal numbers.  I started with the triangular numbers, square numbers and looked for patterns.  I noticed something.
Let $n^{(k)}$ denote the $n$-th $k$-gonal number.  For example, $3^{(3)}$ is the  third triangular number, 6.
I found that there was an easy way to compute the formula for each $k$-gonal and noticed that the 
$$n^{(k)}=n^{(k-1)}+(n-1)^{(3)}$$
So to find the formula for the $n$-th pentagonal number, 
$$n^{(5)}=n^{(4)}+(n-1)^{(3)}$$
$$n^{(5)}=n^2+\frac{n(n-1)}{2}$$
$$n^{(5)}=\frac{n(3n-1)}{2}$$
So after doing this a bunch of times, I think I found the pattern...
Let $f:\mathbb{N}\times\mathbb{N}\rightarrow\mathbb{N}$ such that 
$$f(n,k)=\frac{n[(k-2)n-(k-4)]}{2}$$
Is this the formula for the $n$-th $k$-gonal number?  Are there any other intersting formulas that come out of the 2 x 2 array of these numbers like the one I derived above?
 A: Let $n$ th $r$-gonal number be $u(r,n)$
By the patterns of terms up
to heptagonal numbers it can be observed that,
$$u(r,n) = u(r-1,n) + u(3,n-1)$$
That is,  $$u(r,n) - u(r-1,n) = u(3,n-1)$$
$r=4$ gives $u(4,n) - u(3,n) = u(3,n-1)$
$r=5$ gives $u(5,n) - u(4,n) = u(3,n-1)$
and
$r=k$ gives $u(k,n) - u(k-1,n) = u(3,n-1)$.
By adding these $k-3$ equations,
\begin{align}
u(k,n)- u(3,n) &= (k-3)u(3,n-1)\\
u(k,n) &= u(3,n) + (k-3)u(3,n-1)\\
u(k,n) &= \frac{n(n+1)}2 + (k-3)\frac{(n-1)n}2\\
u(k,n) &= \frac{n}2\cdot ( k(n-1) -2n +4 )
\end{align}
A: Method (iii)  
Let u(k,n) be the n th k - gonal number  
Consider the regular polygon of k sides which represents u(k,n)  
When straight lines drawn through a selected vertex joining other vertices there will be k-2 triangles and out of which any triangle can be used to represent the triangle number u(3,n)  
Now by the each of remaining k-3 triangles we can represent the triangle number u(3,n-1). Here we have n-1 instead of n because these triangles have n-1 dots(points) on the base and sides.  
Therefore, u(k,n) = u(3,n) + (k-3)u(3,n-1)   
u(k,n) = n(n+1)/2 + (k-3)(n-1)n/2  
u(k,n) = (1/2)n{ (n-1)k-2n +4 }
A: Method- (ii)  
3-gonal numbers
1,3,6,10,15,..
4-gonal numbers
1,4,9,16,25,...
5-gonal numbers  
1,5,12,22,35,...  
6-gonal numbers 
1,6,15,28,45,...  
Let u(k,n) be the n th k-gonal number 
In above sequences second difference is a constant, 3-gonalsequence it is 1, 4- gonal sequence it is 2, 5-gonal sequence it is 3
therefore it is k -2 in the case of k-gonal sequence  
u(k,n) need to be a quadratic polynomial of n  
u(k,n) = an^2 + bn + c  
In all above sequences first term is 1. 
By observing the patterns second term of the k- gonal number sequence is given by adding k-1 to the first term and the third term is given by adding (k-1) + (k-2) that is 2k-3 to the second term.  
Therfore first three terms of k-gonal sequence is 1,k,3k-3  
By substituting n =1,2,3 for u(k,n)  
a+b+c =1  
4a+2b+c = k  
9a+3b+c = 3k-3  
By solving these equations   
a= (k-2)/2 , b= (4-k)/2 , c =0  
Therefore  
u(k,n) = {(k-2)/2}n^2 + {(4-k)/2}n  
u(k,n) =( n/2){ (n-1)k-2n +4 }  
Importance of this approach is now you can deduce the relationship  
u(k,n) = u(k-1,n) + u(3,n-1)
