2022 SSMO Speed Round Problems/Problem 10

Problem

Let $S = \{2,7,15,26,....\}$ be the set of all numbers for which the $i^{th}$ element in $S$ is the sum of the $i^{th}$ triangular number and the $i^{th}$ positive perfect square. Let $T$ be the set which contains all unique remainders when the elements in $S$ are divided by $2022$. Find the number of elements in $T$.

Solution