
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 \( n \) be a positive integer such that \( n \geqslant 3 \) and \( a_{n} \) is the largest \( n \)-digit integer that is neither the sum of two perfect squares nor the difference of two perfect squares.
1. Find the expression for \( a_{n} \).
2. Find the minimum value of \( n \) such that the sum of the squares of the digits of \( a_{n} \) is a perfect square.

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