Determine the primes $p$ for which the numbers $2\lfloor p/k\rfloor - 1, \ k = 1,2,\ldots, p,$ are all quadratic residues modulo $p.$

[i]Vlad Matei[/i]
1. **Check for \( p = 2 \):**
   - For \( p = 2 \), we have \( k = 1, 2 \).
   - For \( k = 1 \), \( 2\lfloor 2/1 \rfloor - 1 = 2 \cdot 2 - 1 = 3 \).
   - For \( k = 2 \), \( 2\lfloor 2/2 \rfloor - 1 = 2 \cdot 1 - 1 = 1 \).
   - Both 3 and 1 are quadratic residues modulo 2 (since any number is a quadratic residue modulo 2).
   - Therefore, \( p = 2 \) is valid.

2. **Assume \( p \) is an odd prime:**
   - Let \( k = 1 \). Then \( 2\lfloor p/1 \rfloor - 1 = 2p - 1 \).
   - For \( 2p - 1 \) to be a quadratic residue modulo \( p \), \( -1 \) must be a quadratic residue modulo \( p \).
   - This implies \( \left( \frac{-1}{p} \right) = 1 \), which is true if and only if \( p \equiv 1 \pmod{4} \).

3. **Check for \( k = \lfloor p/2 \rfloor \):**
   - Let \( k = \lfloor p/2 \rfloor \). Then \( 2\lfloor p/k \rfloor - 1 = 2 \cdot 2 - 1 = 3 \).
   - For \( 3 \) to be a quadratic residue modulo \( p \), \( 2 \) must be a quadratic residue modulo \( p \).
   - This implies \( \left( \frac{2}{p} \right) = 1 \).

4. **Analyze the range of \( \lfloor p/m \rfloor \):**
   - Notice that \( \lfloor p/m \rfloor = n \iff \frac{p}{n+1} < m \leq \frac{p}{n} \).
   - If \( n \leq \sqrt{p} - 1 \), then \( \frac{p}{n} - \frac{p}{n+1} \geq 1 \), so there exists some integer \( m \) such that \( \lfloor p/m \rfloor = n \).
   - It follows that \( 2i - 1 \) is a quadratic residue for all \( 1 \leq i \leq \sqrt{p} - 1 \).

5. **Transitivity of Legendre's symbol:**
   - By the transitivity of the Legendre symbol, we have:
     \[
     \left( \frac{\prod p_i^{a_i}}{p} \right) = \prod \left( \frac{p_i}{p} \right)^{a_i}
     \]
   - Therefore, all integers \( 1 \leq n \leq 2\sqrt{p} - 1 \) are quadratic residues modulo \( p \).

6. **Lemma: Smallest non-quadratic residue:**
   - For all odd prime numbers \( p \), the smallest non-quadratic residue is smaller than \( \sqrt{p} + 1 \).
   - Proof: Let \( n \) be the smallest non-quadratic residue. Let \( m = n \left( \lfloor p/n \rfloor + 1 \right) - p \).
   - Observe that \( 0 < m < n \).
   - Furthermore, we have:
     \[
     \left( \frac{m}{p} \right) = \left( \frac{n \left( \lfloor p/n \rfloor + 1 \right)}{p} \right) = \left( \frac{n}{p} \right) \left( \frac{\lfloor p/n \rfloor + 1}{p} \right) = -\left( \frac{\lfloor p/n \rfloor + 1}{p} \right)
     \]
   - Since \( 0 < m < n \), it must be a quadratic residue by the minimality of \( n \).
   - Therefore, \( \lfloor p/n \rfloor + 1 \) is a non-quadratic residue, so by the minimality of \( n \), we get \( \lfloor p/n \rfloor + 1 \geq n \).
   - This yields \( n < \sqrt{p} + 1 \), finishing the proof.

7. **Conclusion:**
   - \( p = 3 \) fails since \( -1 \) is not a quadratic residue modulo 3.
   - The odd primes \( p \geq 5 \) fail due to the lemma.

The final answer is \( \boxed{ p = 2 } \).