
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 \( S=\{1,2, \ldots, n\} \). Define \( A \) as an arithmetic sequence with a positive common difference, containing at least two elements, such that all its elements are within \( S \). Additionally, rearranging the other elements of \( S \) before or after \( A \) should not form a new arithmetic sequence with the same common difference as \( A \). Find the number of such sequences \( A \). (An arithmetic sequence with just two elements is also considered an arithmetic sequence).

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