Problem 6
Find all positive integers for which there exist nonnegative integers such that .
Step 1 of 4: Derive the necessary congruence
In plain words
Clearing the largest power of 3 turns the second equality into an integer congruence modulo n.
Detailed analysis
Let . Multiplying by gives . Reducing this integer equality modulo 2, the left side is odd and the right side is congruent to . Hence this triangular number is odd, so .