Let p>3 be a prime and k>0 an integer. Find the multiplicity of X-1 in the factorization of 
$ f(X)= X^{p^k-1}+X^{p^k-2}+\cdots+X+1$
modulo p; 
in other words, find the unique non-negative integer r such that $ (X - 1)^r $ divides f(X)
  \modulo p, but$ (X - 1)^{r+1} $does not divide f(X) \modulo p.

1. **Understanding the Polynomial**:
   The polynomial \( f(X) = X^{p^k-1} + X^{p^k-2} + \cdots + X + 1 \) is a geometric series. We can rewrite it using the formula for the sum of a geometric series:
   \[
   f(X) = \frac{X^{p^k} - 1}{X - 1}
   \]
   This holds for \( X \neq 1 \).

2. **Evaluating at \( X = 1 \)**:
   To find the multiplicity of \( X - 1 \) in \( f(X) \), we need to evaluate the behavior of \( f(X) \) at \( X = 1 \). Specifically, we need to determine how many times \( X - 1 \) divides \( f(X) \).

3. **Using Derivatives**:
   The multiplicity of \( X - 1 \) as a factor of \( f(X) \) is the highest power \( r \) such that \( f(X) \) and its first \( r-1 \) derivatives evaluated at \( X = 1 \) are zero, but the \( r \)-th derivative is not zero.

4. **First Derivative**:
   The first derivative of \( f(X) \) is:
   \[
   f'(X) = \frac{d}{dX} \left( \frac{X^{p^k} - 1}{X - 1} \right)
   \]
   Using the quotient rule:
   \[
   f'(X) = \frac{(X - 1) \cdot \frac{d}{dX}(X^{p^k} - 1) - (X^{p^k} - 1) \cdot \frac{d}{dX}(X - 1)}{(X - 1)^2}
   \]
   Simplifying, we get:
   \[
   f'(X) = \frac{(X - 1) \cdot p^k X^{p^k-1} - (X^{p^k} - 1)}{(X - 1)^2}
   \]
   \[
   f'(X) = \frac{p^k X^{p^k-1} (X - 1) - (X^{p^k} - 1)}{(X - 1)^2}
   \]
   \[
   f'(X) = \frac{p^k X^{p^k-1} (X - 1) - X^{p^k} + 1}{(X - 1)^2}
   \]
   \[
   f'(X) = \frac{p^k X^{p^k} - p^k X^{p^k-1} - X^{p^k} + 1}{(X - 1)^2}
   \]
   \[
   f'(X) = \frac{(p^k - 1) X^{p^k} - p^k X^{p^k-1} + 1}{(X - 1)^2}
   \]

5. **Evaluating \( f'(1) \)**:
   \[
   f'(1) = \frac{(p^k - 1) \cdot 1^{p^k} - p^k \cdot 1^{p^k-1} + 1}{(1 - 1)^2}
   \]
   This is indeterminate, so we use L'Hôpital's rule or higher derivatives to evaluate the limit.

6. **Higher Derivatives**:
   We continue this process for higher derivatives until we find the first non-zero derivative at \( X = 1 \).

7. **Conclusion**:
   The multiplicity \( r \) of \( X - 1 \) in \( f(X) \) modulo \( p \) is \( p^k \). This is because the polynomial \( f(X) \) can be factored as:
   \[
   f(X) = \frac{X^{p^k} - 1}{X - 1}
   \]
   and \( X^{p^k} - 1 \) has a root of multiplicity \( p^k \) at \( X = 1 \).

The final answer is \( \boxed{ p^k } \)