Number theory · Divisibility · Digit sums · Casting out nines · Triangular numbers · Quadratic factorization
For a natural number \(n\), let \(x_n\) be the number obtained by writing the natural numbers from \(1\) to \(n\) one after another, for example
\[ x_{15} = 123456789101112131415 . \]
Find all natural numbers \(n\) for which \(27\) divides \(x_n^2 + x_n - 2\).
Sign in to check answers, open hints, read the full solution, and track your progress. Statements are always free.
Serbian National Competition (Drzavno takmicenje) 2007, high school grade I, category A, problem 3. Organized by the Mathematical Society of Serbia (DMS). Source