Here is a sequence of hints, in the form of statements to be proven by the reader:
- $f(x^k)$ is positive for $k$ even.
- $f(x^k)$ crosses zero exactly once for $k$ odd, at $x=-1$.
- Hence the derivative of $|f(x^k)|$ has a discontinuity only at $x=-1$ and only for $k$ odd.
For $g$ to be differentiable at $x=-1$, the discontinuity in the derivative of $100 |f(x)|$ must exactly cancel that of the sum.
Lemma: The above holds if and only if $$100 f'(-1) = \sum_{\text{k odd}}^n f(x^k)'|_{x=-1}$$
Proof: Exercise.
Now to answer the question, find a formula for $f(x^k)'|_{x=-1}$ (hint: it's proportional to $k$), evaluate the sum on the right, and find which values of $n$ make it equal to $100 f'(-1)$. Note: There will be two such values of n!