MathDB
Quadratic residues mod n under 1+floor(n)

Source: 2012 Indonesia Round 2 TST 1 Problem 4

February 26, 2012
quadraticsfloor functionsearchmodular arithmeticinductionpigeonhole principlenumber theory

Problem Statement

Determine all natural numbers nn such that for each natural number aa relatively prime with nn and a1+na \le 1 + \left\lfloor \sqrt{n} \right\rfloor there exists some integer xx with ax2modna \equiv x^2 \mod n.
Remark: "Natural numbers" is the set of positive integers.