
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
In a sequence of positive integers, an inversion is a pair of positions where the element at the leftmost position is greater than the element at the rightmost position. For example, the sequence 2, 5, 3, 1, 3 has 5 inversions: between the first and the fourth position, between the second position and all the positions to its right, and finally between the third and the fourth position. Among all sequences of positive integers whose elements sum to $n$, what is the maximum possible number of inversions if

a) $n=7$ ?

b) $n=2019$ ?

Note: The sequences of positive integers considered in this problem can have more than 5 elements.

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