
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
Let  $p$  be a prime number, and let  $n$  be a positive integer. Find the number of quadruples  $(a_1, a_2, a_3, a_4)$  with  $a_i\in \{0, 1, \ldots, p^n - 1\}$  for  $i = 1, 2, 3, 4$ , such that \[p^n \mid (a_1a_2 + a_3a_4 + 1).\]

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