For a positive integer $n$ consider all its divisors $1 = d_1 < d_2 < \ldots < d_k = n$. For $2 \le i \le k-1$, let's call divisor $d_i$ good, if $d_{i-1}d_{i+1}$ isn't divisible by $d_i$. Find all $n$, such that the number of their good divisors is smaller than the number of their prime distinct divisors.

[i]Proposed by Mykhailo Shtandenko[/i]
1. **Identify the divisors and their properties:**
   For a positive integer \( n \), let its divisors be \( 1 = d_1 < d_2 < \ldots < d_k = n \). A divisor \( d_i \) (for \( 2 \le i \le k-1 \)) is called good if \( d_{i-1}d_{i+1} \) is not divisible by \( d_i \).

2. **Analyze the given cases:**
   - For \( n = 1 \), there are no divisors \( d_i \) for \( 2 \le i \le k-1 \), so the number of good divisors is zero, which is less than the number of distinct prime divisors (which is also zero).
   - For prime powers \( n = p^a \) (where \( p \) is a prime and \( a \ge 1 \)), the divisors are \( 1, p, p^2, \ldots, p^a \). Here, there are no good divisors because each \( d_i \) (for \( 2 \le i \le k-1 \)) is a power of \( p \), and \( d_{i-1}d_{i+1} \) is always divisible by \( d_i \).

3. **Consider \( n = p^a q \) with \( q > p^a \):**
   - Let \( p \) and \( q \) be primes, and \( a \ge 1 \).
   - The divisors of \( n \) are \( 1, p, p^2, \ldots, p^a, q, pq, p^2q, \ldots, p^a q \).
   - If \( q > p^a \), then \( q \) and \( p^a \) are not consecutive divisors, and the divisors \( p^i q \) (for \( 0 \le i \le a \)) are good because \( d_{i-1}d_{i+1} \) is not divisible by \( d_i \).

4. **Prove that \( n \) with at least 3 prime divisors has more good divisors than distinct prime divisors:**
   - Let \( n \) have at least 3 prime divisors \( p_1 < p_2 < \cdots < p_k \).
   - Let \( e \ge 1 \) be \( \nu_{p_1}(n) \).
   - **Claim:** For each \( i \) (possibly equaling 1), there exists some \( m \ge 0 \) such that \( p_1^m p_i \) is good.
   - **Proof:** Suppose otherwise. Let \( d_j = p_i \), so \( d_{j-1} \perp d_j \), and we must have \( p_i \mid d_{j+1} \), so in fact \( d_{j+1} = p_1 p_i \). If \( d_{j+1} \) is not good, then we need \( p_1 \mid d_{j+2} \), so \( d_{j+2} = p_1^2 p_i \). Continuing this logic, we get \( d_{j+3} = p_1^3 p_i \), and so on. But then \( d_{j+e+1} \) must equal \( p_1^{e+1} p_i \), which doesn't divide \( n \): contradiction. Therefore, the claim is true.

5. **Conclusion:**
   - For \( n \) with at least 3 prime divisors, there are at least \( k \) good divisors, where \( k \) is the number of distinct prime divisors.
   - Hence, the number of good divisors is smaller than the number of distinct prime divisors only for \( n = 1 \), prime powers, and \( n = p^a q \) with \( q > p^a \).

The final answer is \( \boxed{ n = 1 } \), prime powers, and \( n = p^a q \) with \( q > p^a \), where \( p \) and \( q \) are primes, and \( a \ge 1 \).