
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 that \( p \) and \( q \) (\( q \neq 0 \)) are real numbers, and the equation \( x^{2} - p x + q = 0 \) has two real roots \(\alpha, \beta\), the sequence \(\{a_{n}\}\) is defined by \( a_{1} = p \), \( a_{2} = p^{2} - q \), \( a_{n} = p a_{n-1} - q a_{n-2} \) for \( n = 3, 4, \ldots \).

(1) Find the general term of the sequence \(\{a_{n}\}\) in terms of \(\alpha\) and \(\beta\).

(2) If \( p = 1 \) and \( q = \frac{1}{4} \), find the sum of the first \( n \) terms of the sequence \(\{a_{n}\}\).

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