Let $\Omega(n)$ be the number of prime factors of $n$. Define $f(1)=1$ and $f(n)=(-1)^{\Omega(n)}.$ Furthermore, let 
$$F(n)=\sum_{d|n} f(d).$$
Prove that $F(n)=0,1$ for all positive integers $n$. For which integers $n$ is $F(n)=1?$
1. **Define the function \( f(n) \):**
   - For \( n = 1 \), \( f(1) = 1 \).
   - For \( n > 1 \), \( f(n) = (-1)^{\Omega(n)} \), where \( \Omega(n) \) is the number of prime factors of \( n \) (counted with multiplicity).

2. **Define the function \( F(n) \):**
   - \( F(n) = \sum_{d|n} f(d) \), where the sum is over all divisors \( d \) of \( n \).

3. **Show that \( f \) is multiplicative:**
   - A function \( f \) is multiplicative if \( f(mn) = f(m)f(n) \) for all coprime \( m \) and \( n \).
   - Since \( \Omega(mn) = \Omega(m) + \Omega(n) \) for coprime \( m \) and \( n \), we have:
     \[
     f(mn) = (-1)^{\Omega(mn)} = (-1)^{\Omega(m) + \Omega(n)} = (-1)^{\Omega(m)} \cdot (-1)^{\Omega(n)} = f(m)f(n)
     \]
   - Therefore, \( f \) is multiplicative.

4. **Show that \( F \) is multiplicative:**
   - Since \( f \) is multiplicative, \( F \) is also multiplicative by properties of Dirichlet convolution.

5. **Evaluate \( F(p^k) \) for a prime \( p \) and integer \( k \):**
   - Consider \( n = p^k \). The divisors of \( p^k \) are \( 1, p, p^2, \ldots, p^k \).
   - We need to compute:
     \[
     F(p^k) = \sum_{j=0}^k f(p^j)
     \]
   - Since \( f(p^j) = (-1)^j \), we have:
     \[
     F(p^k) = \sum_{j=0}^k (-1)^j
     \]

6. **Sum the series \( \sum_{j=0}^k (-1)^j \):**
   - If \( k \) is even, say \( k = 2m \), then:
     \[
     \sum_{j=0}^{2m} (-1)^j = 1 - 1 + 1 - 1 + \cdots + 1 = 1
     \]
   - If \( k \) is odd, say \( k = 2m + 1 \), then:
     \[
     \sum_{j=0}^{2m+1} (-1)^j = 1 - 1 + 1 - 1 + \cdots + 1 - 1 = 0
     \]

7. **Conclusion for \( F(p^k) \):**
   - \( F(p^k) = 1 \) if \( k \) is even.
   - \( F(p^k) = 0 \) if \( k \) is odd.

8. **Generalize to any \( n \):**
   - Since \( F \) is multiplicative, for any \( n \) with prime factorization \( n = p_1^{e_1} p_2^{e_2} \cdots p_m^{e_m} \):
     \[
     F(n) = F(p_1^{e_1}) F(p_2^{e_2}) \cdots F(p_m^{e_m})
     \]
   - \( F(p_i^{e_i}) = 1 \) if \( e_i \) is even, and \( 0 \) if \( e_i \) is odd.
   - Therefore, \( F(n) = 1 \) if and only if all \( e_i \) are even, i.e., \( n \) is a perfect square.

The final answer is \( \boxed{ F(n) = 1 } \) if and only if \( n \) is a perfect square.