TITLE: Probability of coprime polynomials
QUESTION [14 upvotes]: Given positive integer $N$, we choose $m_1, m_2, n_1, n_2$ independently and with equal probabilities from $\{0,1,\ldots,N\}$, and let 
$f_1 = x^{m_1} + (1+x)^{n_1}$ and $f_2 = x^{m_2} + (1+x)^{n_2}$ as polynomials in the indeterminate $x$ over the field ${\mathbb F}_2$ of two elements.  Let $P(N)$ be the probability  that $f_1$ and $f_2$ are coprime.  What can be said about $P(N)$, in particular its asymptotics as $N \to \infty$?
By explicit enumeration in Maple, the first few values are
$$\eqalign{P \left( 1 \right) &={\frac {9}{16}},P \left( 2 \right) ={\frac {56}{
81}},P \left( 3 \right) ={\frac {45}{64}},P \left( 4 \right) ={\frac {
489}{625}},P \left( 5 \right) ={\frac {1019}{1296}},\cr P \left( 6
 \right) &={\frac {1895}{2401}},P \left( 7 \right) ={\frac {3299}{4096}
},P \left( 8 \right) ={\frac {5308}{6561}},P \left( 9 \right) ={\frac 
{2023}{2500}},P(10) = \frac{11954}{14641}\cr}$$ 
Random sampling seems to indicate $P(100) \approx 0.83$. The sequence $(N+1)^4 P(N)$
does not appear to be in the OEIS.  
EDIT: That sequence is now in the OEIS as A245488.
$P(100) = 86648767/101^4 \approx 0.8326776196$.

REPLY [5 votes]: This seems to be a hard and interesting problem.  Here's a heuristic on the correct answer, but I have little hope that it can be made into a proof.  Below let $D$ denote a polynomial in ${\Bbb F}_2[x]$ and let $\mu(D)$ denote the Mobius function.  We will only be interested in $D$ that are coprime to $x(1+x)$.  For such $D$ consider the group generated by $x$ and $1+x$ in $({\Bbb F}_2[x]/D)^*$; denote this by $\langle x,1+x\rangle_D$ and its order by 
$|\langle x,1+x\rangle_D|$.  The conjectured probability is 
$$ 
\sum_{D, (D,x(1+x))=1} \frac{\mu(D)}{|\langle x, 1+x \rangle_D|^2}. 
$$ 
To see why this is, note that we can identify whether  $(f,g)=1$ by summing $\sum_{D|f, D|g} \mu(D)$.  Thus the problem asks for 
$$ 
\sum_{D, (D,x(1+x))=1} \mu(D) \Big( \frac{1}{(N+1)^2} \sum_{0 \le a, b\le N; D|x^a+(1+x)^b} 1\Big)^2. 
$$ 
The probability that $D$ divides $x^a+(1+x)^b$ is the same as the probability that 
$D$ divides $x^m (1+x)^n +1 = x^m (1+x)^n -1$.  Since $x^m (1+x)^n$ ranges uniformly over the elements of $\langle x,1+x \rangle_D$, this probability is clearly $1/|\langle x,1+x\rangle_D|$.  This justifies heuristically the conjecture.  The argument could be made precise by splitting $a$ and $b$ into intervals of size the order of $x$ in $({\Bbb F}_2[x]/D)^*$ and the order of $1+x$ there.  The trouble is that there will be an error of 
size $O(1/N)$ in doing so, and this cannot be controlled as the sum over $D$ includes exponentially many terms.   
It seems plausible that the sum over $D$ in the conjecture converges, but I don't see any way to prove this.  It would be interesting to compute it numerically. One can get something rigorous by doing the above analysis with only those $D$ whose irreducible factors have degree below $\log N$ say.  In this way one obtains an upper bound for the desired probability.