What is the smallest square triangular number whose triangular side is the square of a composite number?The answer is 1882672131025, which is the square of 1372105, and also the "triangle" of 1940449. Then 1940449 is 1393 squared, and 1393 is 7 x 199, so is composite.Congratulations to @Varkora who was the first to get in contact with the correct answer. Squares of side s are given by the formula s. Triangles of side ^{2}t are given by the formula t (t + 1) / 2.Here's a table of the first few square triangular numbers greater than 1:
## How do I find square triangular numbers?Well, you could copy them from the Wikipedia page! But if you want to find them yourself, you will soon encounter some interesting mathematical theory: If s, and we introduce ^{2} = t(t+1)/2X=2t+1, Y=s, then this rearranges to an example of Pell's equation:X^{2} - 8 Y^{2} = 1. There's a well-known way to solve Pell's equation using continued fractions, but essentially we find that for some n. Write (X_{n}, Y_{n}) for the nth solution, so X_{n+1}
+ Y_{n+1} sqrt(8) = (X_{n} + Y_{n} sqrt(8)).(3 + sqrt(8)), which gives a
recurrence relation for the solutions, which, in terms of the original
(s_{n}, t_{n}), is:t_{n+1} = 3t_{n} + 4s_{n} + 1
s_{n+1} = 2t_{n} + 3s_{n} + 1Since x _{1} = 1, y_{1} = 1, we can get all the solutions easily. |