For any $k \in \mathbb{Z},$ define $$F_k=X^4+2(1-k)X^2+(1+k)^2.$$ Find all values $k \in \mathbb{Z}$ such that $F_k$ is irreducible over $\mathbb{Z}$ and reducible over $\mathbb{Z}_p,$ for any prime $p.$

[i]Marius Vladoiu[/i]
1. **Claim that \( F_k \) is reducible over each \(\mathbb{Z}_p\):**
   - Let \( K \) be any field of characteristic \( p \).
   - If \(-1\) is a square in \( K \), then \( F_k = (X^2 - (k+1))^2 + 4X^2 \) is reducible over \( K \).
   - If \( k \) is a square in \( K \), then \( F_k = (X^2 + (k+1))^2 - 4kX^2 \) is reducible over \( K \).
   - If neither \(-1\) nor \( k \) is a square in \( K \), then \(-k\) is a square in \( K \), say \(-k = a^2\) for some \( a \in K \). Then \( F_k = (X^2 + (1-k+2a))(X^2 + (1-k-2a)) \) is reducible.

2. **Determine \( k \) such that \( F_k \) is irreducible over \(\mathbb{Z}\):**
   - If \( k \) or \(-k\) is a square in \(\mathbb{Z}\), then \( F_k \) is reducible.
   - Assume \( k \) is not a perfect square or minus a perfect square in \(\mathbb{Z}\). We need to show \( F_k \) is irreducible over \(\mathbb{Z}\).

3. **Prove \( F_k \) is irreducible over \(\mathbb{Z}\) when \( k \) is not a perfect square or minus a perfect square:**
   - Consider \( F_k = (X^2 - (k+1))^2 + 4X^2 \). This polynomial cannot have a real root, hence no linear factor over \(\mathbb{Z}\).
   - If \( F_k \) is reducible, it must be the product of two quadratic factors: \( F_k = (X^2 + aX + b)(X^2 - aX + c) \) with \( a, b, c \in \mathbb{Z} \).
   - From the factorization, we get:
     \[
     0 = a(b - c), \quad bc = (k+1)^2, \quad b + c - a^2 = 2(1 - k)
     \]
   - If \( a = 0 \), then \( b + c = 2(1 - k) \) and \( bc = (k+1)^2 \). The quadratic equation \( T^2 + 2(k-1)T + (k+1)^2 \) must have an integer solution. Its discriminant is:
     \[
     4(k-1)^2 - 4(k+1)^2 = -16k
     \]
     Since \(-k\) is not a perfect square, this equation has no integer solution.
   - If \( b = c \), then \( b = c = \varepsilon (k+1) \) for some \(\varepsilon \in \{-1, 1\}\). Then \( a^2 = 2(b + k - 1) \in \{-4, 4k\} \). Neither \(-4\) nor \( 4k \) is a perfect square, so this case is also impossible.

4. **Conclusion:**
   - Since both cases lead to contradictions, \( F_k \) is irreducible over \(\mathbb{Z}\) when \( k \) is not a perfect square or minus a perfect square.

\(\blacksquare\)

The final answer is \( \boxed{ k } \) is not a perfect square or minus a perfect square in \(\mathbb{Z}\).