
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Determine all integers  $n \ge 3$  whose decimal expansion has less than  $20$  digits, such that every quadratic non-residue modulo  $n$  is a primitive root modulo  $n$ .

*An integer  $a$  is a quadratic non-residue modulo  $n$ , if there is no integer  $b$  such that  $a - b^2$  is divisible by  $n$ . An integer  $a$  is a primitive root modulo  $n$ , if for every integer  $b$  relatively prime to n there is a positive integer  $k$  such that  $a^k - b$  is divisible by  $n$ .*

Present the answer in LaTex format: \boxed{Your answer}
user