For $0 \leq p \leq 1/2,$ let $X_1, X_2, \ldots$ be independent random variables such that 
$$X_i=\begin{cases} 
      1 & \text{with probability } p, \\
      -1 & \text{with probability } p, \\
      0 & \text{with probability } 1-2p, 
   \end{cases}
$$
for all $i \geq 1.$ Given a positive integer $n$ and integers $b,a_1, \ldots, a_n,$ let $P(b, a_1, \ldots, a_n)$ denote the probability that $a_1X_1+ \ldots + a_nX_n=b.$ For which values of $p$ is it the case that $$P(0, a_1, \ldots, a_n) \geq P(b, a_1, \ldots, a_n)$$ for all positive integers $n$ and all integers $b, a_1,\ldots, a_n?$
1. **Define the random variables and their probabilities:**
   Let \(X_1, X_2, \ldots\) be independent random variables such that:
   \[
   X_i = \begin{cases} 
      1 & \text{with probability } p, \\
      -1 & \text{with probability } p, \\
      0 & \text{with probability } 1-2p, 
   \end{cases}
   \]
   for all \(i \geq 1\).

2. **Define the probability \(P(b, a_1, \ldots, a_n)\):**
   Given a positive integer \(n\) and integers \(b, a_1, \ldots, a_n\), let \(P(b, a_1, \ldots, a_n)\) denote the probability that \(a_1X_1 + \ldots + a_nX_n = b\).

3. **Express \(P(0, a_1, \ldots, a_n)\) and \(P(b, a_1, \ldots, a_n)\):**
   For \(a_i = 2^{i-1}\), we have:
   \[
   P(0, 1, 2, 2^2, \ldots, 2^{n-1}) = (1-2p)^n
   \]
   and
   \[
   P(1, 1, 2, 2^2, \ldots, 2^{n-1}) = p(1-2p)^{n-1} + p^2(1-2p)^{n-2} + \cdots + p^n.
   \]

4. **Analyze the ratio as \(n \to \infty\):**
   \[
   \frac{P(1, 1, \ldots, 2^{n-1})}{P(0, 1, \ldots, 2^{n-1})} = \sum_{i=1}^n \left(\frac{p}{1-2p}\right)^i.
   \]
   As \(n \to \infty\), this sum converges to:
   \[
   \sum_{i=1}^\infty \left(\frac{p}{1-2p}\right)^i = \frac{\frac{p}{1-2p}}{1 - \frac{p}{1-2p}} = \frac{p}{1-3p}.
   \]
   For the inequality \(1 \geq \frac{p}{1-3p}\) to hold, we must have:
   \[
   1 - 3p \geq p \implies 1 \geq 4p \implies p \leq \frac{1}{4}.
   \]

5. **Proof of sufficiency for \(p \leq \frac{1}{4}\):**
   For \(p \leq \frac{1}{4}\), select \(r\) such that:
   \[
   2 \leq \frac{1-2p}{p} = r + \frac{1}{r}.
   \]
   Note that \(P(b, a_1, \ldots, a_n)\) is the coefficient of \(x^b\) in the expansion of:
   \[
   f(x) = \prod_{i=1}^n \left[px^{a_i} + px^{-a_i} + (1-2p)\right] = \frac{p^n}{r^n} \cdot \prod_{i=1}^n \left(x^{a_i} + r\right)\left(x^{-a_i} + r\right).
   \]
   We wish to show the constant term is at least as large as any other coefficient.

6. **Apply the lemma:**
   **Lemma:** Let \(g \in \mathbb{R}[x]\) be a polynomial. The constant term of \(g(x)g(1/x)\) is a term of maximal coefficient.

   *Proof:* Flip the signs of all negative coefficients of \(g\). Then rearrange. \(\blacksquare\)

   Applying the lemma to \(g(x) = \prod_{i=1}^n (x^{a_i} + r)\), we conclude that the constant term is at least as large as any other coefficient.

The final answer is \( \boxed{ p \leq \frac{1}{4} } \).