
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 the set $S=\{1,2,3,…,n\}$ ($n\geqslant 5$, $n\in\mathbb{N}^*$), and the set $A=\{a_1,a_2,a_3\}$ satisfy $a_1 < a_2 < a_3$ and $a_3-a_2\leqslant 2$, with $A\subseteq S$  
$(1)$ If $n=6$, find the number of sets $A$ that meet the conditions;  
$(2)$ For any $n$ and $A$ that meet the conditions, find the number of sets $A$.

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