I was just reading about Square Triangular numbers on its Wikipedia page (https://en.wikipedia.org/wiki/Square_triangular_number) and noticed a peculiar pattern in them. Given below is the list of the first $11$ such numbers-
$$0, 1, 36, 1225, 41616, 1413721, 48024900, 1631432881,$$ $$55420693056, 1882672131025, 63995431761796, 2172602007770041$$
The last digits of these numbers seem to repeat in the following order - $0,1,6,5,6,1{\dots}$
Can anyone give a mathematical explanation of why this is happening. Or is it just a coincidence?
A square number has only one of the property:
$$n \equiv 0,1,4,5,6,9, \pmod {10}$$
Also a triangular number is of the form :
$$K = \frac{a(a+1)}{2}$$
Hence for triangular numbers :
$$K \equiv 0,1,3,5,6,8 \pmod{10} \space\space\space\space\space\space\space\space\space \text {(Why? )}$$
Hence for a number to be both square and triangular ,
$$\text{Number} \equiv 0,1,5,6 \mod 10$$
Only possible ending digits are $ \in \{0,1,5,6\} $