a) Prove that if $k$ is an even positive integer and $A$ is a real symmetric $n\times n$ matrix such that $\operatorname{tr}(A^k)^{k+1}=\operatorname{tr}(A^{k+1})^k$, then
$$A^n=\operatorname{tr}(A)A^{n-1}.$$
b) Does the assertion from a) also hold for odd positive integers $k$?
### Part (a)
1. **Given Conditions and Initial Setup:**
   - Let \( k \) be an even positive integer.
   - Let \( A \) be a real symmetric \( n \times n \) matrix.
   - Given that \( \operatorname{tr}(A^k)^{k+1} = \operatorname{tr}(A^{k+1})^k \).

2. **Eigenvalue Decomposition:**
   - Since \( A \) is a real symmetric matrix, it can be diagonalized. Let the eigenvalues of \( A \) be \( \lambda_1, \lambda_2, \ldots, \lambda_n \).
   - Therefore, \( \operatorname{tr}(A^k) = \sum_{i=1}^n \lambda_i^k \) and \( \operatorname{tr}(A^{k+1}) = \sum_{i=1}^n \lambda_i^{k+1} \).

3. **Using the Given Condition:**
   - The given condition translates to:
     \[
     \left( \sum_{i=1}^n \lambda_i^k \right)^{k+1} = \left( \sum_{i=1}^n \lambda_i^{k+1} \right)^k
     \]

4. **Claim 1: Inequality for Positive Real Numbers:**
   - If \( x_1, \ldots, x_m \) are positive real numbers and \( 0 < p < 1 \), then:
     \[
     (x_1 + \cdots + x_m)^p < x_1^p + \cdots + x_m^p
     \]
   - Proof by induction on \( m \). For \( m = 2 \), consider \( f(t) = (1+t)^p - 1 - t^p \) for \( t \ge 0 \). Since \( f'(t) < 0 \) for \( t > 0 \) and \( f(0) = 0 \), it follows that \( f(t) < 0 \) for all \( t > 0 \).

5. **Claim 2: Inequality for Non-zero Real Numbers:**
   - If \( y_1, \ldots, y_m \) are non-zero real numbers and \( k > 0 \) is an even integer, then:
     \[
     (y_1^{k+1} + \cdots + y_m^{k+1})^k < (y_1^k + \cdots + y_m^k)^{k+1}
     \]
   - Proof: Assume \( y_i > 0 \) for all \( i \). Using Claim 1 with \( x_i = y_i^{k+1} \) and \( p = \frac{k}{k+1} \), we get the desired inequality.

6. **Case Analysis:**
   - **Case 1:** \( A \) has at most one non-zero eigenvalue. In this case, \( A^n = \operatorname{tr}(A) A^{n-1} \) by the Cayley-Hamilton theorem.
   - **Case 2:** \( A \) has more than one non-zero eigenvalue. Let \( \lambda_1, \ldots, \lambda_m \) be the non-zero eigenvalues of \( A \). Given:
     \[
     (\lambda_1^k + \cdots + \lambda_m^k)^{k+1} = (\lambda_1^{k+1} + \cdots + \lambda_m^{k+1})^k
     \]
     This is impossible by Claim 2. Hence, this case cannot occur.

7. **Conclusion:**
   - Since Case 2 is impossible, the only possibility is Case 1, which implies:
     \[
     A^n = \operatorname{tr}(A) A^{n-1}
     \]

### Part (b)
1. **Odd Positive Integers \( k \):**
   - The assertion does not necessarily hold for odd positive integers \( k \).
   - Counterexample: For \( k = 1 \), consider a diagonal matrix \( A \in M_3(\mathbb{R}) \) with diagonal entries \( a, b, c \) such that \( abc \neq 0 \) and \( ab + ac + bc = 0 \).

The final answer is \( \boxed{ A^n = \operatorname{tr}(A) A^{n-1} } \) for even \( k \).