MathLabs

Problem 3

Find all positive integers nn such that for any integer kk there exists an integer aa for which a3+a−ka^3+a-k is divisible by nn.
Step 4 of 4: Finish the classification
n=3j(j≥0)n=3^j\quad(j\ge0)
Detailed analysis

Any modulus with a prime factor greater than three inherits the failure modulo that prime; a modulus divisible by two also fails because modulus two fails. Therefore exactly the nonnegative powers of three satisfy the condition.