
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
Given a prime \( p > 2 \), how many residues modulo \( p \) are both squares and squares plus one? For example, for \( p = 7 \), there are two such residues: 1 (since \(1^2 = 1\) and \(2^2 + 1 = 5\)) and 2 (since \(3^2 = 1\) and \(1^2 + 1 = 2\)).

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