
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 an integer sequence $\{a_n\}$ satisfying $a_3=-1$, $a_7=4$, the first $6$ terms form an arithmetic sequence, and starting from the $5$th term, they form a geometric sequence.  
$(1)$ Find the general formula for the sequence $\{a_n\}$.  
$(2)$ Find all positive integers $m$ such that $a_m+a_{m+1}+a_{m+2}=a_ma_{m+1}a_{m+2}$.

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