
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
The function \( f \) is defined on the natural numbers \( 1, 2, 3, \ldots \) by \( f(1)=1 \) and
\[ 
f(n)=\left\{\begin{array}{ll}
f\left(\frac{n}{10}\right) & \text{if } 10 \mid n \\
f(n-1)+1 & \text{otherwise}
\end{array}\right.
\]

(a) Calculate \( f(2019) \).  
(b) Determine the maximum value of \( f(n) \) for \( n \leq 2019 \).  
(c) A new function \( g \) is defined by \( g(1)=1 \) and
\[ 
g(n)=\left\{\begin{array}{ll}
g\left(\frac{n}{3}\right) & \text{if } 3 \mid n \\
g(n-1)+1 & \text{otherwise}
\end{array}\right.
\]

Determine the maximum value of \( g(n) \) for \( n \leq 100 \).

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