(* generalized binomial series of fractional order *)

B[t_,n_]:=Sum[Binomial[t k+1,k]z^k/(t k+1),{k,0,n-1}]+O[z]^n
      (* formal power series for B^{t}(z), up to O(z^n) *)
      (* I assume that t isn't equal to -1 or -1/2 or -1/3 or ... *)

b[t_,z_,e_]:=Block[{tt=1,s=0,n=0},
                While[tt>e,
                  s+=tt;n++;tt=z^n Gamma[n t+1.]/Gamma[n+1]/Gamma[n(t-1)+2.]];
                {s,n,tt}]
b[t_,z_]:=b[t,z,10^-20.][[1]]         
      (* numerical calculation of B^{t}(z); converges slowly near singularity *)

zeta[a_]:=(-1)^(2/a)  (* a-th root of unity *)

T[a_,b_,n_,j_]:=Sum[Binomial[((a+b)k+1)/a,k]/((a+b)k+1)
                      zeta[a]^Mod[j((a+b)k+1),a]
                       z^(((a+b)k+1)/a), {k,0,n-1}] + O[z]^n
  (* the j-th conjugate of (zB^{(a+b)/a}(z^{(a+b)/a}))^(1/a), to O(z^n) *)
T[a_,b_,n_]:=T[a,b,n,0]  (* the real-valued branch *)

poly[a_,b_,n_]:=Block[{t=Simplify[Product[u-T[a,b,n,j],{j,0,a-1}]]},
                 Sum[zz^k Coefficient[t,u,k],{k,0,a}]+BigO[z]^n]
      (* elementary symmetric functions of the conjugates *)

funcs[a_,b_,n_]:=Block[{t=Simplify[Product[u-T[a,b,n,j],{j,0,a-1}]]},
             +Sum[zz^k Expand[-Coefficient[t,u,k]/z],{k,0,a-1}]+BigO[z]^(n-1)]
      (* to show the functions with terms grouped appropriately *)

duchonterm[n_,k_]:=Binomial[5n+2k,k]Binomial[5n+1,n-k]/(5n+k+1)
altduchonterm[n_,k_]:=Binomial[5n+2k,k]Binomial[5n,n-k]-
              Binomial[5n+2k,k-1]Binomial[5n,n-k-1]-
              4Binomial[5n+2k,k]Binomial[5n,n-k-1]-
              6Binomial[5n+2k,k-1]Binomial[5n,n-k]
duchon[n_]:=Sum[duchonterm[n,k],{k,0,n}]
bizley[a_,b_,n_]:=Exp[Sum[Binomial[a k+b k,a k]z^k/(a k+b k),{k,n-1}]+O[z]^n]

hat[aa_,bb_,p_]:=If[p<aa/(aa+bb),1/b[(aa+bb)/bb,(1-p)p^(aa/bb)],
                            1-1/b[(aa+bb)/aa,p(1-p)^(bb/aa)]]

c[p_,q_]:=c[p,q]=If[p<0,0,If[2p>q,0,c[p,q-1]+c[p-1,q]]]
c[0,0]=1
d[p_,q_]:=d[p,q]=If[p<0,0,If[3p>2q,0,d[p,q-1]+d[p-1,q]]]
d[0,0]=1
dd[p_,q_]:=dd[p,q]=If[p<0,0,If[2p<3q,0,dd[p,q-1]+dd[p-1,q]]]
dd[0,0]=1

merry christmas

