I am trying to find the analytical form to this sum: $$ a_n=\sum\limits_{k=0}^n\binom{n}{k}p^k(1-p)^{n-k}\dfrac{\left(\dfrac{p}{q}\right)^k\left(\dfrac{1-p}{1-q}\right)^{n-k}}{1+\left(\dfrac{p}{q}\right)^k\left(\dfrac{1-p}{1-q}\right)^{n-k}} $$ where $0<q<p<1$.
Edit: following the comment by @dezdichado, an equivalent form is: $$ 1-a_n=\sum\limits_{k=0}^n\binom{n}{k}p^k(1-p)^{n-k}\dfrac{1}{1+\left(\dfrac{p}{q}\right)^k\left(\dfrac{1-p}{1-q}\right)^{n-k}}\\ =\sum\limits_{k=0}^n\binom{n}{k}\dfrac{1}{\left(\dfrac{1}{p}\right)^k\left(\dfrac{1}{1-p}\right)^{n-k}+\left(\dfrac{1}{q}\right)^k\left(\dfrac{1}{1-q}\right)^{n-k}} $$
What I have tried so far was using a log in the hopes of writing ratios of successive terms such that a recursion could be found (I have found this suggestion by scanning the book A=B, on the subject of creative telescoping). Unfortunately that has not brought much light to my problem, so I am looking for other avenues which might lead me to a solution.
== Edit 2 ==
Following the suggestion by @Thomas-Andrews, I have plugged in a few numbers but nothing glaring comes out. However, the special case $p=1-q$ is interesting and leads to the following simplification, in which I use the inequality between harmonic and geometric means (I believe I am correct in what I wrote, but not 100% sure): $$ 1-a_n=\sum\limits_{k=0}^n\binom{n}{k}\dfrac{1}{\left(\dfrac{1}{p}\right)^k\left(\dfrac{1}{1-p}\right)^{n-k}+\left(\dfrac{1}{1-p}\right)^k\left(\dfrac{1}{p}\right)^{n-k}}\le(2p(1-p))^n $$
I am not sure this will be good enough, but I am willing to try if I can also find a lower bound (this is because I have multiple such terms, some which are added and others subtracted, therefore I need both an upper and lower bound to make sure the total is still bounded at least on one side). [I am not sure if this search for a lower bound warrants a new and different sub-question, but I will leave this here for now in case someone more knowledgeable about how this works decides to edit this portion of the question.]
In another post, I try to calculate a more complex version of this sum. A person suggested an idea which yields me to believe that if I could solve the simpler problem posed here, I might be able to solve the other more complex sum using further steps.
You said "I need both an upper and lower bound".
This answer proves that $$1-\frac 12\bigg(\sqrt{pq}+\sqrt{(1-p)(1-q)}\bigg)^n\leqslant a_n\lt 1-\frac 12(q+1-p)^n$$ from which $\displaystyle\lim_{n\to\infty}a_n=1$ follows.
Proof :
You have $\displaystyle 1-a_n=\sum\limits_{k=0}^n\binom{n}{k}\dfrac{1}{D}$ where $$D=\left(\dfrac{1}{p}\right)^k\left(\dfrac{1}{1-p}\right)^{n-k}+\left(\dfrac{1}{q}\right)^k\left(\dfrac{1}{1-q}\right)^{n-k}$$
Since $\dfrac 1p\lt \dfrac 1q$ and $\dfrac{1}{1-q}\lt\dfrac{1}{1-p}$, we get $D\lt 2\left(\dfrac{1}{q}\right)^k\left(\dfrac{1}{1-p}\right)^{n-k}$ from which we have $$1-a_n\gt \frac 12(q+1-p)^n\tag1$$
Next, using $\dfrac{2}{\dfrac{1}{a}+\dfrac 1b}\leqslant \sqrt{ab}$, i.e. $\dfrac{1}{a+b}\leqslant\dfrac 12(ab)^{-\frac 12}$, we get $$\frac 1D\leqslant \frac 12\bigg(\bigg(\frac{1}{pq}\bigg)^k\bigg(\frac{1}{(1-p)(1-q)}\bigg)^{n-k}\bigg)^{-\frac 12}$$ i.e. $$\frac 1D\leqslant \frac 12\bigg(\sqrt{pq}\bigg)^k\bigg(\sqrt{(1-p)(1-q)}\bigg)^{n-k}$$ from which we have $$1-a_n\leqslant \frac 12\bigg(\sqrt{pq}+\sqrt{(1-p)(1-q)}\bigg)^n\tag2$$
Therefore, it follows from $(1)(2)$ that $$1-\frac 12\bigg(\sqrt{pq}+\sqrt{(1-p)(1-q)}\bigg)^n\leqslant a_n\lt 1-\frac 12(q+1-p)^n\tag3$$
Here, $\sqrt{pq}+\sqrt{(1-p)(1-q)}\lt 1$ holds since it is equivalent to
$$\bigg(\sqrt{(1-p)(1-q)}\bigg)^2\lt (1-\sqrt{pq})^2\iff (\sqrt p-\sqrt q)^2\gt 0$$ which is true.
Since $0\lt q+1-p\lt 1$ and $0\lt \sqrt{pq}+\sqrt{(1-p)(1-q)}\lt 1$, we get, from $(3)$, $\displaystyle\lim_{n\to\infty}a_n=1$.