
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 sequence $\{a_n\}$, where $a_1=1$, $a_2=a$, and $a_{n+1}=k(a_n+a_{n+2})$ for any positive integer $n$, the sum of the first $n$ terms of the sequence is denoted by $S_n$.
1. If $k=\frac{1}{2}$ and $S_{2017}=2017a$, find $a$.
2. Does there exist a real number $k$ such that the sequence $\{a_n\}$ is a geometric sequence with a common ratio not equal to $1$, and for any three consecutive terms $a_m$, $a_{m+1}$, $a_{m+2}$, arranged in some order, they form an arithmetic sequence? If such $k$ exists, find all values of $k$; if not, explain why.
3. If $k=-\frac{1}{2}$, find $S_n$.

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