A positive integer is written on a blackboard. Players $A$ and $B$ play the following game: in each move one has to choose a proper divisor $m$ of the number $n$ written on the blackboard ($1<m<n$) and replaces $n$ with $n-m$. Player $A$ makes the first move, then players move alternately. The player who can't make a move loses the game. For which starting numbers is there a winning strategy for player $B$?
1. **Define Winning and Losing Positions:**
   - A number \( n \) is a "winning position" if the player faced with \( n \) can guarantee a win.
   - A number \( n \) is a "losing position" if the next player can force a win.

2. **Claim:**
   - \( n \) is a winning position if and only if \( n \) is even and not an odd power of 2.

3. **Proof by Strong Induction:**
   - **Base Case:**
     - For \( n = 1 \), there are no proper divisors \( 1 < m < 1 \), so the player cannot make a move and loses. Thus, \( n = 1 \) is a losing position.
   
   - **Inductive Step:**
     - Assume the claim holds for all numbers less than \( n \). We need to show it holds for \( n \).

     - **Case 1: \( n \) is odd:**
       - Any proper divisor \( d \) of \( n \) must also be odd.
       - Subtracting an odd \( d \) from \( n \) results in an even number \( n - d \).
       - By the induction hypothesis, \( n - d \) is a winning position for the opponent since it is even and not an odd power of 2.
       - Therefore, \( n \) is a losing position.

     - **Case 2: \( n = 2^{2k+1} \) (an odd power of 2):**
       - Any proper divisor \( d \) of \( n \) must be even.
       - Subtracting an even \( d \) from \( n \) results in an even number \( n - d \).
       - If \( d = 2^{2k} \), then \( n - d = 2^{2k} \), which is a power of 2 but not an odd power of 2.
       - By the induction hypothesis, \( n - d \) is a winning position for the opponent.
       - Therefore, \( n = 2^{2k+1} \) is a losing position.

     - **Case 3: \( n = 2^{2k} \) (an even power of 2):**
       - The player can choose \( d = 2^{2k-1} \), a proper divisor of \( n \).
       - Subtracting \( d \) from \( n \) results in \( n - d = 2^{2k} - 2^{2k-1} = 2^{2k-1} \), which is an odd power of 2.
       - By the induction hypothesis, \( 2^{2k-1} \) is a losing position for the opponent.
       - Therefore, \( n = 2^{2k} \) is a winning position.

     - **Case 4: \( n \) is even and not a power of 2:**
       - The player can choose an odd proper divisor \( d \) of \( n \).
       - Subtracting an odd \( d \) from \( n \) results in an odd number \( n - d \).
       - By the induction hypothesis, \( n - d \) is a losing position for the opponent.
       - Therefore, \( n \) is a winning position.

4. **Conclusion:**
   - Player \( B \) has a winning strategy if and only if \( n \) is odd or an odd power of 2.

The final answer is \( \boxed{ n } \) is odd or an odd power of 2.