Triangular Square Numbers

The numbers, which can be both triangular and square, are called triangular square numbers.

E.g. 36 is both triangular and square. 6, on the other hand, is triangular, but not square; 25, is a square, but not triangular.

Triangular numbers are given by the formula n(n+1)/2 where n >=1. The following programme, generates first 20 triangular numbers

Triangular Square Numbers can be derived in the following way.

(n)(n+1)/2 = m2 where m and n are integers. The left-hand side denotes a triangular number and the right-hand side denotes a square number.
(n2 + n)/2 = m2
n2 + n = 2m2
Using the completing the square method,
(n + 1/2)2 - 1/4 = 2m2
(2n + 1)2 - 1 = 8m2
Let y =2m and x = 2n +1
Then, x2 -1 = 2y2 where x represents an odd number and y, an even number.
x2 - 2y2 = 1

This is Pell Equation

Find pairs of (x,y) which satisfy the Pell Equation and the half of y value in each pair is the square root of a Triangular Square numbers.

Now, in order to generate first few triangular square numbers, please press the button.



Recommended Reading


Maths is challenging; so is finding the right book. K A Stroud, in this book, cleverly managed to make all the major topics crystal clear with plenty of examples; popularity of the book speak for itself - 7th edition in print.

Recommended - GCSE & iGCSE


This is the best book available for the new GCSE(9-1) specification and iGCSE: there are plenty of worked examples; a really good collection of problems for practising; every single topic is adequately covered; the topics are organized in a logical order.

Recommended for A Level


This is the best book that can be recommended for the new A Level - Edexcel board: it covers every single topic in detail;lots of worked examples; ample problems for practising; beautifully and clearly presented.