$$S(p,x,y)=\sum_{n=1}^{\infty}(1-p)^{n-1}\sum_{a+b\le n,0\le b<a}\binom{n}{a,b,n-a-b}x^ay^b(1-x-y)^{n-a-b}$$
I am unable to simplify the sum. Mathematica doesn't help either. Any help will be much appreciated.
EDIT: I was trying to solve https://projecteuler.net/problem=661 There must be some way to evaluate the sum.