There are infinitely many triplets (n, n+1, n+2) such that each member of the triplet is a square or a sum of two squares.
Prove it.
Source: Putnam 2000
A perfect square or a sum of two squares cannot be congruent to 3 mod 4. Then our triplet is of the form {4k, 4k+1, 4k+2}
An easy option is for two of the numbers to be a perfect square and that square plus 1. Also, I will have the perfect square be the odd middle number.
Then I can write the triplet as {(2m+1)^2-1, (2m+1)^2, (2m+1)^2+1}. So then all that leaves is to find values of m such that (2m+1)^2-1 is a sum of two squares.
(2m+1)^2-1 = 4m^2+4m. By simply letting m itself be a perfect square then the expression will be easily seen to be the sum of two squares. If we say m=x^2 then our triplet can be written as {(2x^2)^2+(2x)^2, (2x^2+1)^2, (2x^2+1)^2+1}
Since x can take any integer value then there is in fact an infinite number of triplets {n, n+1, n+2} such that each member is a square or sum of two squares by letting n=(2x^2+1)^2.