
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
a) Find all positive integers  $g$  with the following property: for each odd prime number  $p$  there exists a positive integer  $n$  such that  $p$  divides the two integers
\[g^n - n\quad\text{ and }\quad g^{n+1} - (n + 1).\]
b) Find all positive integers  $g$  with the following property: for each odd prime number  $p$  there exists a positive integer  $n$  such that  $p$  divides the two integers
\[g^n - n^2\quad\text{ and }g^{n+1} - (n + 1)^2.\]

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