
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 sequence $\{a_n\}$ satisfy: (i) $a_1=1$; (ii) all terms $a_n \in \mathbb{N^*}$; (iii) $1 = a_1 < a_2 < \ldots < a_n < a_{n+1} < \ldots$. Let the set $A_m = \{n \mid a_n \leq m, m \in \mathbb{N^*}\}$, and denote the maximum value of the elements in set $A_m$ as $b_m$. In other words, $b_m$ is the maximal number of terms of the sequence $\{a_n\}$ that satisfy the inequality $a_n \leq m$. We call the sequence $\{b_n\}$ the companion sequence of $\{a_n\}$. For example, the companion sequence of $1, 3, 5$ is $1, 1, 2, 2, 3$.

(1) Write out the companion sequence of $1, 4, 7$;
(2) Let $a_n = 3^{n-1}$, find the sum of the first 20 terms of the companion sequence $\{b_n\}$ of $\{a_n\}$;
(3) If the sum of the first $n$ terms of the sequence $\{a_n\}$ is $S_n = n^2 + c$ (where $c$ is a constant), find the sum of the first $m$ terms of the companion sequence $\{b_m\}$, $T_m$.

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