# $r$ and $(r+1)$-gonal numbers

If a number is both square and triangular, then we know that $\frac{n(n+1)}{2}=m^2$. If a number is both square and pentagonal then $m^2=\frac{n(3n-1)}{2}$. So if a number is $(r-1)$-gonal and $r$-gonal, then $\frac{n((r-1)n-(r-3))}{2}=\frac{m((m-2)m-(m-4))}{2}$. Firstly, how can we derive, from the simple observation given for the square triangular case and the square pentagonal case a general formula for the $k$-th square-triangular number and the $k$-th ssquare pentagonal number?

Also, and this is the main question- is it possible to derive a general formula for the $k$-th $r$-gonal $(r+1)$-gonal number?

• Some of the $m$'s on the right hand side of your formula should be $r$'s. – David E Speyer Dec 14 '12 at 21:37
• Both give rise to simple Pell equations, and in both cases we can write down the fundamental solution by inspection. I have not checked the $r-1, r$. – André Nicolas Dec 14 '12 at 21:46

## 1 Answer

If we find two numbers $p$ and $q$ such that $p^2=2q^2 \pm 1$, then $(pq)^2$ is a square triangular number. To see this, for the + we would have $2q^2+1=p^2$, so $T_{p^2}=p^2(2q^2)/2=(pq)^2$

To find numbers $p$ and $q$ like this, we have a Pell equation, though the sign on the constant term can be $\pm 1$. Given a pair, $(p, q)$, there is then another pair $(p+2q, p+q)$. You can start with $(1,0), (1,1), (3,2), (7,5), \ldots$, giving square triangular numbers $0,1,36, 1225, \ldots$

Similar techniques apply for the other combinations.

• What I meant is can we just give a generalization in terms of n? – Johann Linus Dec 14 '12 at 23:48