GF[1] = (4*y*(-1 + z)*z^w - (-2)^w*(-6 + 2*y*z^w + z*(6 + y*(-3 + z^w))))/
     ((-1 + z)*(-4*y*(-1 + z)*z^w + (-2)^w*(-6 + 2*y*z^w + z*(3 + y*z^w))))
 
GF[2] = (-16*y^2*(-1 + z)*z^(2*w) + (-2)^(3*w)*(36 - 20*y*z^w + 
        z*(-36 + 27*y - 7*y*z^w)) + (-1)^w*2^(3 + w)*y*z^w*
       (-4 + 2*y*z^w + z*(4 + y*(-3 + z^w))) - (-2)^(2*w)*y*z^w*
       (20 - 4*y*z^w + z*(-20 + y*(3 + z^w))))/
     ((-1 + z)*(16*y^2*(-1 + z)*z^(2*w) - (-1)^w*2^(3 + w)*y*z^w*
        (-4 + z + 2*y*z^w + y*z^(1 + w)) + (-2)^(3*w)*(-36 + 9*z + 20*y*z^w + 
         7*y*z^(1 + w)) + (-2)^(2*w)*y*z^w*(20 - 4*y*z^w + z*(-17 + y*z^w))))
 
GF[3] = (64*y^3*(-1 + z)*z^(3*w) + (-2)^(6*w)*(216 - 152*y*z^w + 
        z*(-216 + 189*y - 37*y*z^w)) + (-2)^(5*w)*y*z^w*
       (z*(120 - 45*y - 11*y*z^w) + 8*(-15 + 7*y*z^w)) + 
      (-2)^(4*w)*y*z^w*(8*(-21 + 13*y*z^w) + z*(168 - 153*y + 49*y*z^w)) - 
      (-1)^w*2^(4 + w)*y^2*z^(2*w)*(-10 + 6*y*z^w + 
        z*(10 + 3*y*(-3 + z^w))) + (-1)^(2*w)*2^(2 + 2*w)*y^2*z^(2*w)*
       (28 - 12*y*z^w + z*(-28 + 3*y*(3 + z^w))) - (-2)^(3*w)*y*z^w*
       (8*(26 - 27*y*z^w + y^2*z^(2*w)) + z*(-208 + y^2*z^w*(-9 + z^w) + 
          36*y*(5 + z^w))))/((-1 + z)*(-64*y^3*(-1 + z)*z^(3*w) + 
       (-2)^(3*w)*y*z^w*(-1 + y*z^w)*(-208 + 28*z + 8*y*z^w + y*z^(1 + w)) + 
       (-1)^w*2^(4 + w)*y^2*z^(2*w)*(-10 + z + 6*y*z^w + 3*y*z^(1 + w)) + 
       (-2)^(6*w)*(-216 + 27*z + 152*y*z^w + 37*y*z^(1 + w)) - 
       (-2)^(4*w)*y*z^w*(-168 + 15*z + 104*y*z^w + 49*y*z^(1 + w)) - 
       (-1)^(2*w)*2^(2 + 2*w)*y^2*z^(2*w)*(28 - 12*y*z^w + 
         z*(-19 + 3*y*z^w)) + (-2)^(5*w)*y*z^w*(120 - 56*y*z^w + 
         z*(-75 + 11*y*z^w))))
 
GF[4] = (-256*y^4*(-1 + z)*z^(4*w) + (-2)^(9*w)*y*z^w*
       (-784 + 528*y*z^w + z*(784 - 447*y - 81*y*z^w)) + 
      (-2)^(10*w)*(z*(-1296 + 1215*y - 175*y*z^w) + 16*(81 - 65*y*z^w)) + 
      (-2)^(5*w)*y^2*z^(2*w)*(z*(-1552 + 1215*y - 175*y*z^w) + 
        16*(97 - 65*y*z^w)) + (-2)^(8*w)*y*z^w*(-912 + 656*y*z^w + 
        z*(912 - 927*y + 271*y*z^w)) + (-1)^w*2^(8 + w)*y^3*z^(3*w)*
       (-3 + 2*y*z^w + z*(3 + y*(-3 + z^w))) - (-1)^(2*w)*2^(5 + 2*w)*y^3*
       z^(3*w)*(20 - 12*y*z^w + z*(-20 + 3*y*(3 + z^w))) - 
      (-2)^(4*w)*y^2*z^(2*w)*(-16*(56 - 57*y*z^w + y^2*z^(2*w)) + 
        z*(896 - 912*y + y^2*z^w*(15 + z^w))) + (-1)^(3*w)*2^(4 + 3*w)*y^2*
       z^(2*w)*(8*(9 - 10*y*z^w + y^2*z^(2*w)) + 
        z*(-72 + y^2*z^w*(-9 + z^w) + 2*y*(33 + 7*z^w))) + 
      (-2)^(6*w)*y*z^w*(-80*(16 - 21*y*z^w + 5*y^2*z^(2*w)) + 
        z*(1280 - 240*y*(5 + 2*z^w) + y^2*z^w*(303 + 97*z^w))) - 
      (-2)^(7*w)*y*z^w*(16*(73 - 82*y*z^w + 9*y^2*z^(2*w)) + 
        z*(-1168 + 3*y^2*z^w*(-53 + 5*z^w) + y*(1071 + 241*z^w))))/
     ((-1 + z)*(256*y^4*(-1 + z)*z^(4*w) - (-1)^(3*w)*2^(4 + 3*w)*y^2*z^(2*w)*
        (-1 + y*z^w)*(-72 + 6*z + 8*y*z^w + y*z^(1 + w)) - 
       (-1)^w*2^(8 + w)*y^3*z^(3*w)*(-3 + y*z^w*(2 + z)) + 
       (-2)^(8*w)*y*z^w*(912 - 656*y*z^w + z*(15 - 271*y*z^w)) + 
       (-2)^(4*w)*y^2*z^(2*w)*(-1 + y*z^w)*(896 - 16*y*z^w + 
         z*(16 + y*z^w)) + (-1)^(2*w)*2^(5 + 2*w)*y^3*z^(3*w)*
        (20 - 12*y*z^w + z*(-11 + 3*y*z^w)) + (-2)^(7*w)*y*z^w*(-1 + y*z^w)*
        (16*(-73 + 9*y*z^w) + z*(97 + 15*y*z^w)) + (-2)^(9*w)*y*z^w*
        (784 - 528*y*z^w + z*(-337 + 81*y*z^w)) - (-2)^(6*w)*y*z^w*
        (-1 + y*z^w)*(80*(16 - 5*y*z^w) + z*(-80 + 97*y*z^w)) + 
       (-2)^(10*w)*(16*(-81 + 65*y*z^w) + z*(81 + 175*y*z^w)) + 
       (-2)^(5*w)*y^2*z^(2*w)*(16*(-97 + 65*y*z^w) + z*(337 + 175*y*z^w))))
 
GF[5] = (1024*y^5*(-1 + z)*z^(5*w) + (-2)^(15*w)*(7776 - 6752*y*z^w + 
        z*(-7776 + y*(7533 - 781*z^w))) - (-1)^w*2^(8 + w)*y^4*z^(4*w)*
       (2*(-7 + 5*y*z^w) + z*(14 + 5*y*(-3 + z^w))) + 
      (-1)^(2*w)*2^(7 + 2*w)*y^4*z^(4*w)*(28 - 20*y*z^w + 
        z*(-28 + 5*y*(3 + z^w))) + (-1)^(4*w)*2^(2 + 4*w)*y^3*z^(3*w)*
       (-16*(76 - 81*y*z^w + 5*y^2*z^(2*w)) + z*(1216 + 24*y*(-55 + z^w) + 
          5*y^2*z^w*(15 + z^w))) - (-1)^(3*w)*2^(5 + 3*w)*y^3*z^(3*w)*
       (8*(24 - 29*y*z^w + 5*y^2*z^(2*w)) + z*(-192 + 5*y^2*z^w*(-9 + z^w) + 
          4*y*(45 + 13*z^w))) - (-2)^(5*w)*y^3*z^(3*w)*
       (32*(274 - 243*y*z^w + y^2*z^(2*w)) + z*(-8768 + y^2*z^w*(-33 + z^w) + 
          12*y*(625 + 23*z^w))) + (-2)^(6*w)*y^2*z^(2*w)*
       (32*(232 - 435*y*z^w + 171*y^2*z^(2*w)) + 
        z*(-7424 + 480*y*(15 + 14*z^w) + 9*y^2*z^w*(-677 + 69*z^w))) + 
      (-2)^(8*w)*y^2*z^(2*w)*(32*(355 - 364*y*z^w + 41*y^2*z^(2*w)) + 
        z*(-11360 + y^2*z^w*(-1473 + 161*z^w) + y*(11373 + 275*z^w))) + 
      (-2)^(9*w)*y^2*z^(2*w)*(32*(315 - 294*y*z^w + 11*y^2*z^(2*w)) + 
        z*(-10080 - y^2*z^w*(333 + 19*z^w) + y*(8973 + 435*z^w))) + 
      (-2)^(14*w)*y*z^w*(-5216 + 4192*y*z^w + 
        z*(5216 - y*(3693 + 499*z^w))) + (-2)^(7*w)*y^2*z^(2*w)*
       (32*(202 - 365*y*z^w + 131*y^2*z^(2*w)) + 
        z*(-6464 + 20*y*(303 + 281*z^w) - y^2*z^w*(3693 + 499*z^w))) - 
      (-1)^(10*w)*2^(1 + 10*w)*y*z^w*
       (32*(121 - 243*y*z^w + 106*y^2*z^(2*w)) + 
        z*(-3872 + y^2*z^w*(-3783 + 391*z^w) + 6*y*(625 + 671*z^w))) + 
      (-2)^(11*w)*y*z^w*(-32*(233 - 324*y*z^w + 91*y^2*z^(2*w)) + 
        z*(7456 + y^2*z^w*(2253 + 659*z^w) - 3*y*(2411 + 1045*z^w))) + 
      (-2)^(13*w)*y*z^w*(-5216 + 4192*y*z^w + 
        z*(5216 + y*(-5613 + 1421*z^w))) - (-2)^(12*w)*y*z^w*
       (32*(203 - 254*y*z^w + 51*y^2*z^(2*w)) + 
        z*(-6496 + 3*y^2*z^w*(-591 + 47*z^w) + y*(6093 + 2035*z^w))))/
     ((-1 + z)*(-1024*y^5*(-1 + z)*z^(5*w) + (-1)^w*2^(8 + w)*y^4*z^(4*w)*
        (-14 - z + 10*y*z^w + 5*y*z^(1 + w)) + (-1)^(3*w)*2^(5 + 3*w)*y^3*
        z^(3*w)*(-1 + y*z^w)*(-192 + 12*z + 40*y*z^w + 5*y*z^(1 + w)) + 
       (-2)^(12*w)*y*z^w*(-1 + y*z^w)*(-6496 + 403*z + 1632*y*z^w + 
         141*y*z^(1 + w)) + (-2)^(13*w)*y*z^w*(5216 - 4192*y*z^w + 
         z*(397 - 1421*y*z^w)) - (-1)^(2*w)*2^(7 + 2*w)*y^4*z^(4*w)*
        (28 - 20*y*z^w + z*(-13 + 5*y*z^w)) - (-1)^(4*w)*2^(2 + 4*w)*y^3*
        z^(3*w)*(-1 + y*z^w)*(1216 - 80*y*z^w + z*(104 + 5*y*z^w)) + 
       (-2)^(14*w)*y*z^w*(5216 - 4192*y*z^w + z*(-1523 + 499*y*z^w)) - 
       (-2)^(11*w)*y*z^w*(-1 + y*z^w)*(7456 - 2912*y*z^w + 
         z*(-223 + 659*y*z^w)) + (-2)^(15*w)*(-7776 + 6752*y*z^w + 
         z*(243 + 781*y*z^w)) + (-2)^(5*w)*y^3*z^(3*w)*
        (32*(274 - 243*y*z^w + y^2*z^(2*w)) + z*(-1268 + 243*y*z^w + 
           y^2*z^(2*w))) + (-2)^(9*w)*y^2*z^(2*w)*
        (-32*(315 - 294*y*z^w + 11*y^2*z^(2*w)) + 
         z*(1107 - 102*y*z^w + 19*y^2*z^(2*w))) - (-2)^(8*w)*y^2*z^(2*w)*
        (32*(355 - 364*y*z^w + 41*y^2*z^(2*w)) + 
         z*(13 - 1198*y*z^w + 161*y^2*z^(2*w))) + (-1)^(10*w)*2^(1 + 10*w)*y*
        z^w*(32*(121 - 243*y*z^w + 106*y^2*z^(2*w)) + 
         z*(-122 + 243*y*z^w + 391*y^2*z^(2*w))) + (-2)^(7*w)*y^2*z^(2*w)*
        (-32*(202 - 365*y*z^w + 131*y^2*z^(2*w)) + 
         z*(404 - 1927*y*z^w + 499*y^2*z^(2*w))) - (-2)^(6*w)*y^2*z^(2*w)*
        (32*(232 - 435*y*z^w + 171*y^2*z^(2*w)) + 
         z*(-224 + 627*y*z^w + 621*y^2*z^(2*w)))))
 
Expectation[1] = (3*(-1)^w*2^(-1 + w)*w*(-8 - (-2)^w + 3*(-2)^w*w))/
      (-4 + (-1)^w*2^(2 + w) + 3*(-2)^w*w)^2 + 
     (3*(-2)^w*n)/(-4 + (-1)^w*2^(2 + w) + 3*(-2)^w*w)
 
Expectation[2] = (3*(-2)^w*(8 + 9*(-2)^w)*n)/(-16 + (-1)^(2*w)*2^(4 + 2*w) + 
       27*(-2)^(2*w)*w + 3*(-1)^w*2^(3 + w)*w) + 
     (3*(-1)^w*2^(-1 + w)*w*(-256 - 117*(-2)^(3*w) - 19*(-1)^w*2^(5 + w) - 
        27*(-1)^(2*w)*2^(4 + 2*w) + 243*(-2)^(3*w)*w + 3*(-1)^w*2^(6 + w)*w + 
        27*(-1)^(2*w)*2^(4 + 2*w)*w))/(-16 + (-1)^(2*w)*2^(4 + 2*w) + 
        27*(-2)^(2*w)*w + 3*(-1)^w*2^(3 + w)*w)^2
 
Expectation[3] = (9*(-2)^w*(16 + 37*(-2)^(2*w) + 21*(-2)^(3*w) + 
        9*(-1)^w*2^(2 + w))*n)/(-64 - (-1)^w*2^(6 + w) + 
       (-1)^(3*w)*2^(6 + 3*w) + (-1)^(4*w)*2^(6 + 4*w) + 333*(-2)^(3*w)*w + 
       189*(-2)^(4*w)*w + 9*(-1)^w*2^(4 + w)*w + 81*(-1)^(2*w)*2^(2 + 2*w)*
        w) + (9*(-1)^w*2^(-1 + w)*w*(-2048 - 22151*(-2)^(5*w) - 
        2415*(-2)^(7*w) - 37*(-1)^w*2^(8 + w) - 85*(-1)^(2*w)*2^(8 + 2*w) - 
        2017*(-1)^(3*w)*2^(4 + 3*w) - 4003*(-1)^(4*w)*2^(3 + 4*w) - 
        4863*(-1)^(6*w)*2^(1 + 6*w) + 25929*(-2)^(5*w)*w + 
        3969*(-2)^(7*w)*w + 9*(-1)^w*2^(8 + w)*w + 81*(-1)^(2*w)*2^(7 + 2*w)*
         w + 1395*(-1)^(3*w)*2^(4 + 3*w)*w + 3753*(-1)^(4*w)*2^(3 + 4*w)*w + 
        6993*(-1)^(6*w)*2^(1 + 6*w)*w))/(-64 - (-1)^w*2^(6 + w) + 
        (-1)^(3*w)*2^(6 + 3*w) + (-1)^(4*w)*2^(6 + 4*w) + 333*(-2)^(3*w)*w + 
        189*(-2)^(4*w)*w + 9*(-1)^w*2^(4 + w)*w + 81*(-1)^(2*w)*2^(2 + 2*w)*
         w)^2
 
Expectation[4] = (3*(-2)^w*(256 + 1013*(-2)^(3*w) + 661*(-2)^(4*w) + 
        405*(-2)^(5*w) + 19*(-1)^w*2^(5 + w) + 57*(-1)^(2*w)*2^(4 + 2*w))*n)/
      (-256 - (-1)^w*2^(8 + w) - (-1)^(2*w)*2^(8 + 2*w) + 
       (-1)^(4*w)*2^(8 + 4*w) + (-1)^(5*w)*2^(8 + 5*w) + 
       (-1)^(6*w)*2^(8 + 6*w) + 3039*(-2)^(4*w)*w + 1983*(-2)^(5*w)*w + 
       1215*(-2)^(6*w)*w + 3*(-1)^w*2^(8 + w)*w + 57*(-1)^(2*w)*2^(5 + 2*w)*
        w + 171*(-1)^(3*w)*2^(4 + 3*w)*w) + 
     (3*(-1)^w*2^(-1 + w)*w*(-131072 - 7386901*(-2)^(7*w) - 
        2942751*(-2)^(9*w) - 350325*(-2)^(11*w) - 39*(-1)^w*2^(14 + w) - 
        225*(-1)^(2*w)*2^(13 + 2*w) - 7503*(-1)^(3*w)*2^(9 + 3*w) - 
        11947*(-1)^(4*w)*2^(9 + 4*w) - 124995*(-1)^(5*w)*2^(6 + 5*w) - 
        262007*(-1)^(6*w)*2^(5 + 6*w) - 2568165*(-1)^(8*w)*2^(1 + 8*w) - 
        578421*(-1)^(10*w)*2^(1 + 10*w) + 8172939*(-2)^(7*w)*w + 
        3772353*(-2)^(9*w)*w + 492075*(-2)^(11*w)*w + 3*(-1)^w*2^(16 + w)*w + 
        57*(-1)^(2*w)*2^(14 + 2*w)*w + 2451*(-1)^(3*w)*2^(10 + 3*w)*w + 
        9537*(-1)^(4*w)*2^(9 + 4*w)*w + 112593*(-1)^(5*w)*2^(6 + 5*w)*w + 
        268017*(-1)^(6*w)*2^(5 + 6*w)*w + 3116859*(-1)^(8*w)*2^(1 + 8*w)*w + 
        803115*(-1)^(10*w)*2^(1 + 10*w)*w))/
      (-256 - (-1)^w*2^(8 + w) - (-1)^(2*w)*2^(8 + 2*w) + 
        (-1)^(4*w)*2^(8 + 4*w) + (-1)^(5*w)*2^(8 + 5*w) + 
        (-1)^(6*w)*2^(8 + 6*w) + 3039*(-2)^(4*w)*w + 1983*(-2)^(5*w)*w + 
        1215*(-2)^(6*w)*w + 3*(-1)^w*2^(8 + w)*w + 57*(-1)^(2*w)*2^(5 + 2*w)*
         w + 171*(-1)^(3*w)*2^(4 + 3*w)*w)^2
 
Expectation[5] = (3*(-2)^w*(1280 + 18931*(-2)^(4*w) + 16973*(-2)^(6*w) + 
        12013*(-2)^(7*w) + 2511*(-2)^(9*w) + 35*(-1)^w*2^(7 + w) + 
        295*(-1)^(2*w)*2^(5 + 2*w) + 3785*(-1)^(3*w)*2^(2 + 3*w) + 
        10081*(-1)^(5*w)*2^(1 + 5*w) + 3151*(-1)^(8*w)*2^(1 + 8*w))*n)/
      (-1024 - (-1)^w*2^(11 + w) - 3*(-1)^(2*w)*2^(10 + 2*w) - 
       3*(-1)^(3*w)*2^(10 + 3*w) - (-1)^(4*w)*2^(11 + 4*w) + 
       (-1)^(6*w)*2^(11 + 6*w) + 3*(-1)^(7*w)*2^(10 + 7*w) + 
       3*(-1)^(8*w)*2^(10 + 8*w) + (-1)^(9*w)*2^(11 + 9*w) + 
       (-1)^(10*w)*2^(10 + 10*w) + 56793*(-2)^(5*w)*w + 50919*(-2)^(7*w)*w + 
       36039*(-2)^(8*w)*w + 7533*(-2)^(10*w)*w + 15*(-1)^w*2^(8 + w)*w + 
       105*(-1)^(2*w)*2^(7 + 2*w)*w + 885*(-1)^(3*w)*2^(5 + 3*w)*w + 
       11355*(-1)^(4*w)*2^(2 + 4*w)*w + 30243*(-1)^(6*w)*2^(1 + 6*w)*w + 
       9453*(-1)^(9*w)*2^(1 + 9*w)*w) + 
     (3*(-1)^w*2^(-1 + w)*w*(-2621440 - 4104063445*(-2)^(9*w) - 
        2753726117*(-2)^(13*w) - 1112198445*(-2)^(15*w) - 
        14993181*(-2)^(19*w) - 285*(-1)^w*2^(16 + w) - 
        145*(-1)^(2*w)*2^(19 + 2*w) - 27405*(-1)^(3*w)*2^(13 + 3*w) - 
        128593*(-1)^(4*w)*2^(12 + 4*w) - 2025481*(-1)^(5*w)*2^(9 + 5*w) - 
        1716575*(-1)^(6*w)*2^(10 + 6*w) - 163693329*(-1)^(7*w)*2^(4 + 7*w) - 
        432986495*(-1)^(8*w)*2^(3 + 8*w) - 1090926201*(-1)^(10*w)*
         2^(2 + 10*w) - 2088619577*(-1)^(11*w)*2^(1 + 11*w) - 
        1792841029*(-1)^(12*w)*2^(1 + 12*w) - 467455069*(-1)^(14*w)*
         2^(2 + 14*w) - 280929189*(-1)^(16*w)*2^(1 + 16*w) - 
        117375505*(-1)^(17*w)*2^(1 + 17*w) - 18362781*(-1)^(18*w)*
         2^(2 + 18*w) + 4239323883*(-2)^(9*w)*w + 3261403035*(-2)^(13*w)*w + 
        1378480275*(-2)^(15*w)*w + 18915363*(-2)^(19*w)*w + 
        75*(-1)^w*2^(16 + w)*w + 525*(-1)^(2*w)*2^(16 + 2*w)*w + 
        2025*(-1)^(3*w)*2^(16 + 3*w)*w + 180675*(-1)^(4*w)*2^(11 + 4*w)*w + 
        1600965*(-1)^(5*w)*2^(9 + 5*w)*w + 1485585*(-1)^(6*w)*2^(10 + 6*w)*
         w + 152013615*(-1)^(7*w)*2^(4 + 7*w)*w + 426270225*(-1)^(8*w)*
         2^(3 + 8*w)*w + 1175261703*(-1)^(10*w)*2^(2 + 10*w)*w + 
        2331557895*(-1)^(11*w)*2^(1 + 11*w)*w + 2066231547*(-1)^(12*w)*
         2^(1 + 12*w)*w + 567739971*(-1)^(14*w)*2^(2 + 14*w)*w + 
        354975387*(-1)^(16*w)*2^(1 + 16*w)*w + 150066735*(-1)^(17*w)*
         2^(1 + 17*w)*w + 23736483*(-1)^(18*w)*2^(2 + 18*w)*w))/
      (-1024 - (-1)^w*2^(11 + w) - 3*(-1)^(2*w)*2^(10 + 2*w) - 
        3*(-1)^(3*w)*2^(10 + 3*w) - (-1)^(4*w)*2^(11 + 4*w) + 
        (-1)^(6*w)*2^(11 + 6*w) + 3*(-1)^(7*w)*2^(10 + 7*w) + 
        3*(-1)^(8*w)*2^(10 + 8*w) + (-1)^(9*w)*2^(11 + 9*w) + 
        (-1)^(10*w)*2^(10 + 10*w) + 56793*(-2)^(5*w)*w + 50919*(-2)^(7*w)*w + 
        36039*(-2)^(8*w)*w + 7533*(-2)^(10*w)*w + 15*(-1)^w*2^(8 + w)*w + 
        105*(-1)^(2*w)*2^(7 + 2*w)*w + 885*(-1)^(3*w)*2^(5 + 3*w)*w + 
        11355*(-1)^(4*w)*2^(2 + 4*w)*w + 30243*(-1)^(6*w)*2^(1 + 6*w)*w + 
        9453*(-1)^(9*w)*2^(1 + 9*w)*w)^2
 
Var[1] = (3*(-1)^w*2^(2 + w)*(-1 + (-2)^w)*(4 + 5*(-2)^w)*n)/
      (-4 + (-1)^w*2^(2 + w) + 3*(-2)^w*w)^3 + 
     (3*(-1)^w*2^(-2 + w)*w*(256 + 21*(-1)^w*2^(5 + w) - 
        3*(-1)^(2*w)*2^(8 + 2*w) - 5*(-1)^(3*w)*2^(5 + 3*w) + 
        303*(-2)^(3*w)*w + 3*(-1)^w*2^(5 + w)*w - 3*(-1)^(2*w)*2^(6 + 2*w)*
         w - 3*(-1)^(2*w)*2^(4 + 2*w)*w^2 + 3*(-1)^(3*w)*2^(4 + 3*w)*w^2 + 
        9*(-2)^(3*w)*w^3))/(-4 + (-1)^w*2^(2 + w) + 3*(-2)^w*w)^4
 
Var[2] = (3*(-1)^w*2^(4 + w)*(-1 + (-2)^w)*(1 + (-2)^w)*
       (128 + 261*(-2)^(3*w) + 29*(-1)^w*2^(4 + w) + 
        35*(-1)^(2*w)*2^(4 + 2*w))*n)/(-16 + (-1)^(2*w)*2^(4 + 2*w) + 
        27*(-2)^(2*w)*w + 3*(-1)^w*2^(3 + w)*w)^3 + 
     (3*(-1)^w*2^(-2 + w)*w*(131072 + 59*(-1)^w*2^(14 + w) + 
        279*(-1)^(2*w)*2^(13 + 2*w) + 3689*(-1)^(3*w)*2^(9 + 3*w) - 
        397*(-1)^(4*w)*2^(11 + 4*w) - 9525*(-1)^(5*w)*2^(8 + 5*w) - 
        783*(-1)^(6*w)*2^(11 + 6*w) - 1629*(-1)^(7*w)*2^(8 + 7*w) + 
        380295*(-2)^(7*w)*w + 3*(-1)^w*2^(15 + w)*w + 
        27*(-1)^(2*w)*2^(13 + 2*w)*w + 171*(-1)^(3*w)*2^(9 + 3*w)*w + 
        105*(-1)^(4*w)*2^(11 + 4*w)*w + 8109*(-1)^(5*w)*2^(7 + 5*w)*w + 
        36369*(-1)^(6*w)*2^(5 + 6*w)*w - 3*(-1)^(2*w)*2^(15 + 2*w)*w^2 - 
        81*(-1)^(3*w)*2^(12 + 3*w)*w^2 - 537*(-1)^(4*w)*2^(9 + 4*w)*w^2 + 
        2997*(-1)^(5*w)*2^(6 + 5*w)*w^2 + 729*(-1)^(6*w)*2^(9 + 6*w)*w^2 + 
        2187*(-1)^(7*w)*2^(6 + 7*w)*w^2 + 59049*(-2)^(7*w)*w^3 + 
        9*(-1)^(3*w)*2^(12 + 3*w)*w^3 + 81*(-1)^(4*w)*2^(11 + 4*w)*w^3 + 
        2187*(-1)^(5*w)*2^(7 + 5*w)*w^3 + 6561*(-1)^(6*w)*2^(5 + 6*w)*w^3))/
      (-16 + (-1)^(2*w)*2^(4 + 2*w) + 27*(-2)^(2*w)*w + 3*(-1)^w*2^(3 + w)*w)^
       4
 
Var[3] = (9*(-1)^w*2^(6 + w)*(-1 + (-2)^w)*(1 + (-2)^w)*
       (1 + (-2)^w + (-2)^(2*w))*(1024 + 26823*(-2)^(5*w) + 3759*(-2)^(7*w) + 
        3*(-1)^w*2^(11 + w) + 267*(-1)^(2*w)*2^(6 + 2*w) + 
        1849*(-1)^(3*w)*2^(4 + 3*w) + 4251*(-1)^(4*w)*2^(3 + 4*w) + 
        6719*(-1)^(6*w)*2^(1 + 6*w))*n)/(-64 - (-1)^w*2^(6 + w) + 
        (-1)^(3*w)*2^(6 + 3*w) + (-1)^(4*w)*2^(6 + 4*w) + 333*(-2)^(3*w)*w + 
        189*(-2)^(4*w)*w + 9*(-1)^w*2^(4 + w)*w + 81*(-1)^(2*w)*2^(2 + 2*w)*
         w)^3 + (9*(-1)^w*2^(-2 + w)*w*(16777216 + 97*(-1)^w*2^(21 + w) + 
        523*(-1)^(2*w)*2^(21 + 2*w) + 27645*(-1)^(3*w)*2^(17 + 3*w) + 
        125475*(-1)^(4*w)*2^(16 + 4*w) + 1636331*(-1)^(5*w)*2^(13 + 5*w) + 
        473047*(-1)^(6*w)*2^(15 + 6*w) + 2737797*(-1)^(7*w)*2^(12 + 7*w) + 
        1106659*(-1)^(8*w)*2^(10 + 8*w) - 588929*(-1)^(9*w)*2^(14 + 9*w) - 
        7530187*(-1)^(10*w)*2^(11 + 10*w) - 14046415*(-1)^(11*w)*
         2^(10 + 11*w) - 9079681*(-1)^(12*w)*2^(10 + 12*w) - 
        2059935*(-1)^(13*w)*2^(11 + 13*w) - 305499*(-1)^(14*w)*
         2^(12 + 14*w) - 189903*(-1)^(15*w)*2^(10 + 15*w) + 
        4979264877*(-2)^(11*w)*w + 77843997*(-2)^(15*w)*w + 
        9*(-1)^w*2^(21 + w)*w + 117*(-1)^(2*w)*2^(20 + 2*w)*w + 
        5787*(-1)^(3*w)*2^(16 + 3*w)*w + 2799*(-1)^(4*w)*2^(18 + 4*w)*w + 
        62793*(-1)^(5*w)*2^(14 + 5*w)*w + 152973*(-1)^(6*w)*2^(13 + 6*w)*w + 
        6925383*(-1)^(7*w)*2^(8 + 7*w)*w + 5748615*(-1)^(8*w)*2^(9 + 8*w)*w + 
        140457141*(-1)^(9*w)*2^(5 + 9*w)*w + 339694749*(-1)^(10*w)*
         2^(4 + 10*w)*w + 843078393*(-1)^(12*w)*2^(2 + 12*w)*w + 
        808365663*(-1)^(13*w)*2^(1 + 13*w)*w + 125789517*(-1)^(14*w)*
         2^(2 + 14*w)*w - 27*(-1)^(2*w)*2^(20 + 2*w)*w^2 - 
        837*(-1)^(3*w)*2^(18 + 3*w)*w^2 - 6237*(-1)^(4*w)*2^(17 + 4*w)*w^2 - 
        116937*(-1)^(5*w)*2^(14 + 5*w)*w^2 - 372141*(-1)^(6*w)*2^(13 + 6*w)*
         w^2 - 3158757*(-1)^(7*w)*2^(10 + 7*w)*w^2 - 7086555*(-1)^(8*w)*
         2^(8 + 8*w)*w^2 + 335043*(-1)^(9*w)*2^(11 + 9*w)*w^2 + 
        5446035*(-1)^(10*w)*2^(9 + 10*w)*w^2 + 13109391*(-1)^(11*w)*
         2^(8 + 11*w)*w^2 + 9835209*(-1)^(12*w)*2^(8 + 12*w)*w^2 + 
        2468151*(-1)^(13*w)*2^(9 + 13*w)*w^2 + 392931*(-1)^(14*w)*
         2^(10 + 14*w)*w^2 + 250047*(-1)^(15*w)*2^(8 + 15*w)*w^2 + 
        5067961587*(-2)^(11*w)*w^3 + 47258883*(-2)^(15*w)*w^3 + 
        243*(-1)^(3*w)*2^(16 + 3*w)*w^3 + 2187*(-1)^(4*w)*2^(16 + 4*w)*w^3 + 
        77031*(-1)^(5*w)*2^(13 + 5*w)*w^3 + 110079*(-1)^(6*w)*2^(14 + 6*w)*
         w^3 + 14534073*(-1)^(7*w)*2^(8 + 7*w)*w^3 + 2845287*(-1)^(8*w)*
         2^(11 + 8*w)*w^3 + 221926311*(-1)^(9*w)*2^(5 + 9*w)*w^3 + 
        424428903*(-1)^(10*w)*2^(4 + 10*w)*w^3 + 722712375*(-1)^(12*w)*
         2^(2 + 12*w)*w^3 + 602148897*(-1)^(13*w)*2^(1 + 13*w)*w^3 + 
        83265651*(-1)^(14*w)*2^(2 + 14*w)*w^3))/
      (-64 - (-1)^w*2^(6 + w) + (-1)^(3*w)*2^(6 + 3*w) + 
        (-1)^(4*w)*2^(6 + 4*w) + 333*(-2)^(3*w)*w + 189*(-2)^(4*w)*w + 
        9*(-1)^w*2^(4 + w)*w + 81*(-1)^(2*w)*2^(2 + 2*w)*w)^4
 
Var[4] = (3*(-1)^w*2^(8 + w)*(-1 + (-2)^w)*(1 + (-2)^w)*(1 + (-2)^(2*w))*
       (1 + (-2)^w + (-2)^(2*w))*(65536 + 7931669*(-2)^(7*w) + 
        3474975*(-2)^(9*w) + 454005*(-2)^(11*w) + 51*(-1)^w*2^(13 + w) + 
        339*(-1)^(2*w)*2^(12 + 2*w) + 12473*(-1)^(3*w)*2^(8 + 3*w) + 
        5391*(-1)^(4*w)*2^(10 + 4*w) + 120135*(-1)^(5*w)*2^(6 + 5*w) + 
        267687*(-1)^(6*w)*2^(5 + 6*w) + 2899173*(-1)^(8*w)*2^(1 + 8*w) + 
        714869*(-1)^(10*w)*2^(1 + 10*w))*n)/
      (-256 - (-1)^w*2^(8 + w) - (-1)^(2*w)*2^(8 + 2*w) + 
        (-1)^(4*w)*2^(8 + 4*w) + (-1)^(5*w)*2^(8 + 5*w) + 
        (-1)^(6*w)*2^(8 + 6*w) + 3039*(-2)^(4*w)*w + 1983*(-2)^(5*w)*w + 
        1215*(-2)^(6*w)*w + 3*(-1)^w*2^(8 + w)*w + 57*(-1)^(2*w)*2^(5 + 2*w)*
         w + 171*(-1)^(3*w)*2^(4 + 3*w)*w)^3 + 
     (3*(-1)^w*2^(-2 + w)*w*(17179869184 + 103*(-1)^w*2^(31 + w) + 
        1269*(-1)^(2*w)*2^(30 + 2*w) + 82615*(-1)^(3*w)*2^(26 + 3*w) + 
        251389*(-1)^(4*w)*2^(26 + 4*w) + 4880087*(-1)^(5*w)*2^(23 + 5*w) + 
        19515199*(-1)^(6*w)*2^(22 + 6*w) + 1049897481*(-1)^(7*w)*
         2^(17 + 7*w) + 373096951*(-1)^(8*w)*2^(19 + 8*w) + 
        1785592473*(-1)^(9*w)*2^(17 + 9*w) + 3494619667*(-1)^(10*w)*
         2^(16 + 10*w) + 41098505799*(-1)^(11*w)*2^(12 + 11*w) + 
        3657513887*(-1)^(12*w)*2^(14 + 12*w) - 8159513765*(-1)^(13*w)*
         2^(13 + 13*w) - 1331639873*(-1)^(14*w)*2^(17 + 14*w) - 
        28526932913*(-1)^(15*w)*2^(13 + 15*w) - 14404797783*(-1)^(16*w)*
         2^(14 + 16*w) - 2970005069*(-1)^(17*w)*2^(16 + 17*w) - 
        8177050189*(-1)^(18*w)*2^(14 + 18*w) - 9417855975*(-1)^(19*w)*
         2^(13 + 19*w) - 277819557*(-1)^(20*w)*2^(17 + 20*w) - 
        1674135171*(-1)^(21*w)*2^(13 + 21*w) - 227365623*(-1)^(22*w)*
         2^(14 + 22*w) - 159211575*(-1)^(23*w)*2^(12 + 23*w) - 
        92759376583353*(-2)^(15*w)*w - 7842432928059*(-2)^(19*w)*w + 
        28983709575*(-2)^(23*w)*w + 3*(-1)^w*2^(33 + w)*w + 
        81*(-1)^(2*w)*2^(31 + 2*w)*w + 4563*(-1)^(3*w)*2^(27 + 3*w)*w + 
        21261*(-1)^(4*w)*2^(26 + 4*w)*w + 262113*(-1)^(5*w)*2^(23 + 5*w)*w + 
        334989*(-1)^(6*w)*2^(22 + 6*w)*w - 27164157*(-1)^(7*w)*2^(17 + 7*w)*
         w - 30301683*(-1)^(8*w)*2^(19 + 8*w)*w - 140935245*(-1)^(9*w)*
         2^(18 + 9*w)*w - 1988282601*(-1)^(10*w)*2^(15 + 10*w)*w - 
        45989795067*(-1)^(11*w)*2^(11 + 11*w)*w - 113484590517*(-1)^(12*w)*
         2^(10 + 12*w)*w - 966886492287*(-1)^(13*w)*2^(7 + 13*w)*w - 
        1795341504975*(-1)^(14*w)*2^(6 + 14*w)*w - 16221989377305*(-1)^(16*w)*
         2^(2 + 16*w)*w - 19408130166717*(-1)^(17*w)*2^(1 + 17*w)*w - 
        1215014909793*(-1)^(18*w)*2^(4 + 18*w)*w - 147018460149*(-1)^(20*w)*
         2^(4 + 20*w)*w - 204722379549*(-1)^(21*w)*2^(1 + 21*w)*w + 
        1666621575*(-1)^(22*w)*2^(2 + 22*w)*w - 3*(-1)^(2*w)*2^(34 + 2*w)*
         w^2 - 195*(-1)^(3*w)*2^(31 + 3*w)*w^2 - 6861*(-1)^(4*w)*2^(28 + 4*w)*
         w^2 - 170139*(-1)^(5*w)*2^(25 + 5*w)*w^2 - 407247*(-1)^(6*w)*
         2^(25 + 6*w)*w^2 - 25259637*(-1)^(7*w)*2^(20 + 7*w)*w^2 - 
        162154869*(-1)^(8*w)*2^(18 + 8*w)*w^2 - 1733972595*(-1)^(9*w)*
         2^(15 + 9*w)*w^2 - 3814756779*(-1)^(10*w)*2^(14 + 10*w)*w^2 - 
        52550646615*(-1)^(11*w)*2^(10 + 11*w)*w^2 - 7329559119*(-1)^(12*w)*
         2^(12 + 12*w)*w^2 + 1528054485*(-1)^(13*w)*2^(11 + 13*w)*w^2 + 
        1080860817*(-1)^(14*w)*2^(15 + 14*w)*w^2 + 27813708609*(-1)^(15*w)*
         2^(11 + 15*w)*w^2 + 15367652679*(-1)^(16*w)*2^(12 + 16*w)*w^2 + 
        3358941297*(-1)^(17*w)*2^(14 + 17*w)*w^2 + 9667122141*(-1)^(18*w)*
         2^(12 + 18*w)*w^2 + 11499375975*(-1)^(19*w)*2^(11 + 19*w)*w^2 + 
        348682569*(-1)^(20*w)*2^(15 + 20*w)*w^2 + 2131534035*(-1)^(21*w)*
         2^(11 + 21*w)*w^2 + 293768775*(-1)^(22*w)*2^(12 + 22*w)*w^2 + 
        199290375*(-1)^(23*w)*2^(10 + 23*w)*w^2 + 246247540180857*(-2)^(15*w)*
         w^3 + 42299614799739*(-2)^(19*w)*w^3 + 242137805625*(-2)^(23*w)*
         w^3 + 9*(-1)^(3*w)*2^(32 + 3*w)*w^3 + 171*(-1)^(4*w)*2^(31 + 4*w)*
         w^3 + 13851*(-1)^(5*w)*2^(27 + 5*w)*w^3 + 196929*(-1)^(6*w)*
         2^(25 + 6*w)*w^3 + 17407377*(-1)^(7*w)*2^(20 + 7*w)*w^3 + 
        39426993*(-1)^(8*w)*2^(20 + 8*w)*w^3 + 302304375*(-1)^(9*w)*
         2^(18 + 9*w)*w^3 + 4002080355*(-1)^(10*w)*2^(15 + 10*w)*w^3 + 
        92692933443*(-1)^(11*w)*2^(11 + 11*w)*w^3 + 236707921395*(-1)^(12*w)*
         2^(10 + 12*w)*w^3 + 2143374725475*(-1)^(13*w)*2^(7 + 13*w)*w^3 + 
        4310204050647*(-1)^(14*w)*2^(6 + 14*w)*w^3 + 48639369697497*
         (-1)^(16*w)*2^(2 + 16*w)*w^3 + 67582602106749*(-1)^(17*w)*
         2^(1 + 17*w)*w^3 + 5107963437153*(-1)^(18*w)*2^(4 + 18*w)*w^3 + 
        1140840418005*(-1)^(20*w)*2^(4 + 20*w)*w^3 + 
        3146268008925*(-1)^(21*w)*2^(1 + 21*w)*w^3 + 395192813625*(-1)^(22*w)*
         2^(2 + 22*w)*w^3))/(-256 - (-1)^w*2^(8 + w) - 
        (-1)^(2*w)*2^(8 + 2*w) + (-1)^(4*w)*2^(8 + 4*w) + 
        (-1)^(5*w)*2^(8 + 5*w) + (-1)^(6*w)*2^(8 + 6*w) + 3039*(-2)^(4*w)*w + 
        1983*(-2)^(5*w)*w + 1215*(-2)^(6*w)*w + 3*(-1)^w*2^(8 + w)*w + 
        57*(-1)^(2*w)*2^(5 + 2*w)*w + 171*(-1)^(3*w)*2^(4 + 3*w)*w)^4
 
Var[5] = (3*(-1)^w*2^(10 + w)*(-1 + (-2)^w)*(1 + (-2)^w)*(1 + (-2)^(2*w))*
       (1 + (-2)^w + (-2)^(2*w))*(1 + (-2)^w + (-2)^(2*w) + (-2)^(3*w) + 
        (-2)^(4*w))*(1310720 + 4034639317*(-2)^(9*w) + 
        2941538981*(-2)^(13*w) + 1229011245*(-2)^(15*w) + 
        17564445*(-2)^(19*w) + 175*(-1)^w*2^(16 + w) + 
        1625*(-1)^(2*w)*2^(15 + 2*w) + 41985*(-1)^(3*w)*2^(12 + 3*w) + 
        420841*(-1)^(4*w)*2^(10 + 4*w) + 1744033*(-1)^(5*w)*2^(9 + 5*w) + 
        1540745*(-1)^(6*w)*2^(10 + 6*w) + 152127377*(-1)^(7*w)*2^(4 + 7*w) + 
        414626815*(-1)^(8*w)*2^(3 + 8*w) + 1098076025*(-1)^(10*w)*
         2^(2 + 10*w) + 2147720761*(-1)^(11*w)*2^(1 + 11*w) + 
        1880294725*(-1)^(12*w)*2^(1 + 12*w) + 508112221*(-1)^(14*w)*
         2^(2 + 14*w) + 315457445*(-1)^(16*w)*2^(1 + 16*w) + 
        133836305*(-1)^(17*w)*2^(1 + 17*w) + 21261725*(-1)^(18*w)*
         2^(2 + 18*w))*n)/(-1024 - (-1)^w*2^(11 + w) - 
        3*(-1)^(2*w)*2^(10 + 2*w) - 3*(-1)^(3*w)*2^(10 + 3*w) - 
        (-1)^(4*w)*2^(11 + 4*w) + (-1)^(6*w)*2^(11 + 6*w) + 
        3*(-1)^(7*w)*2^(10 + 7*w) + 3*(-1)^(8*w)*2^(10 + 8*w) + 
        (-1)^(9*w)*2^(11 + 9*w) + (-1)^(10*w)*2^(10 + 10*w) + 
        56793*(-2)^(5*w)*w + 50919*(-2)^(7*w)*w + 36039*(-2)^(8*w)*w + 
        7533*(-2)^(10*w)*w + 15*(-1)^w*2^(8 + w)*w + 105*(-1)^(2*w)*
         2^(7 + 2*w)*w + 885*(-1)^(3*w)*2^(5 + 3*w)*w + 
        11355*(-1)^(4*w)*2^(2 + 4*w)*w + 30243*(-1)^(6*w)*2^(1 + 6*w)*w + 
        9453*(-1)^(9*w)*2^(1 + 9*w)*w)^3 + 
     (3*(-1)^w*2^(-2 + w)*w*(5497558138880 + 705*(-1)^w*2^(37 + w) + 
        3105*(-1)^(2*w)*2^(38 + 2*w) + 292805*(-1)^(3*w)*2^(34 + 3*w) + 
        2613323*(-1)^(4*w)*2^(33 + 4*w) + 75571617*(-1)^(5*w)*2^(30 + 5*w) + 
        230579049*(-1)^(6*w)*2^(30 + 6*w) + 19532021493*(-1)^(7*w)*
         2^(25 + 7*w) + 91442631359*(-1)^(8*w)*2^(24 + 8*w) + 
        1535183458889*(-1)^(9*w)*2^(21 + 9*w) + 1458510512601*(-1)^(10*w)*
         2^(22 + 10*w) + 10108951492853*(-1)^(11*w)*2^(20 + 11*w) + 
        64204683392721*(-1)^(12*w)*2^(18 + 12*w) + 374729776357161*
         (-1)^(13*w)*2^(16 + 13*w) + 2011290110931865*(-1)^(14*w)*
         2^(14 + 14*w) + 309675512314375*(-1)^(15*w)*2^(17 + 15*w) + 
        696503013414661*(-1)^(16*w)*2^(16 + 16*w) + 5521786745779*(-1)^(17*w)*
         2^(23 + 17*w) + 1262589757749879*(-1)^(18*w)*2^(15 + 18*w) + 
        1868488026435815*(-1)^(19*w)*2^(14 + 19*w) + 461984788269217*
         (-1)^(20*w)*2^(15 + 20*w) - 42883439428233*(-1)^(21*w)*
         2^(16 + 21*w) - 1242386025112507*(-1)^(22*w)*2^(14 + 22*w) - 
        1059237598135415*(-1)^(23*w)*2^(15 + 23*w) - 669485030025025*
         (-1)^(24*w)*2^(16 + 24*w) - 1436990107571717*(-1)^(25*w)*
         2^(15 + 25*w) - 2737930016074831*(-1)^(26*w)*2^(14 + 26*w) - 
        2359949547238069*(-1)^(27*w)*2^(14 + 27*w) - 928267558352041*
         (-1)^(28*w)*2^(15 + 28*w) - 167174323627463*(-1)^(29*w)*
         2^(17 + 29*w) - 441024283821439*(-1)^(30*w)*2^(15 + 30*w) - 
        531032292197277*(-1)^(31*w)*2^(14 + 31*w) - 72545756470323*
         (-1)^(32*w)*2^(16 + 32*w) - 71331296212853*(-1)^(33*w)*
         2^(15 + 33*w) - 62277032303127*(-1)^(34*w)*2^(14 + 34*w) - 
        11838290264505*(-1)^(35*w)*2^(15 + 35*w) - 1901506435025*(-1)^(36*w)*
         2^(16 + 36*w) - 491205790965*(-1)^(37*w)*2^(16 + 37*w) - 
        46249791885*(-1)^(38*w)*2^(17 + 38*w) - 40012571565*(-1)^(39*w)*
         2^(14 + 39*w) - 91479023081215124793*(-2)^(19*w)*w - 
        46070807423988905025*(-2)^(27*w)*w - 6497228792521976241*(-2)^(31*w)*
         w - 175155107542857*(-2)^(39*w)*w + 75*(-1)^w*2^(37 + w)*w + 
        825*(-1)^(2*w)*2^(37 + 2*w)*w + 146175*(-1)^(3*w)*2^(32 + 3*w)*w + 
        531825*(-1)^(4*w)*2^(32 + 4*w)*w + 5358765*(-1)^(5*w)*2^(30 + 5*w)*
         w + 32011545*(-1)^(6*w)*2^(28 + 6*w)*w - 119968395*(-1)^(7*w)*
         2^(25 + 7*w)*w - 4747470315*(-1)^(8*w)*2^(24 + 8*w)*w - 
        19855945149*(-1)^(9*w)*2^(24 + 9*w)*w - 946757952687*(-1)^(10*w)*
         2^(20 + 10*w)*w - 18643052660007*(-1)^(11*w)*2^(17 + 11*w)*w - 
        79987908241689*(-1)^(12*w)*2^(16 + 12*w)*w - 614538439039959*
         (-1)^(13*w)*2^(14 + 13*w)*w - 4295544871339041*(-1)^(14*w)*
         2^(12 + 14*w)*w - 110418080055377013*(-1)^(15*w)*2^(8 + 15*w)*w - 
        164286538486960791*(-1)^(16*w)*2^(8 + 16*w)*w - 
        1820486192691210855*(-1)^(17*w)*2^(5 + 17*w)*w - 
        4713125345692103475*(-1)^(18*w)*2^(4 + 18*w)*w - 
        13024940291766630513*(-1)^(20*w)*2^(3 + 20*w)*w - 
        27896816601307666353*(-1)^(21*w)*2^(2 + 21*w)*w - 
        28106404025704105785*(-1)^(22*w)*2^(2 + 22*w)*w - 
        53289911663427814083*(-1)^(23*w)*2^(1 + 23*w)*w - 
        11879073089977446921*(-1)^(24*w)*2^(3 + 24*w)*w - 
        39812500370704579389*(-1)^(25*w)*2^(1 + 25*w)*w - 
        1956130669961055975*(-1)^(26*w)*2^(5 + 26*w)*w - 
        7913272524705315951*(-1)^(28*w)*2^(2 + 28*w)*w - 
        5055800046902455137*(-1)^(29*w)*2^(2 + 29*w)*w - 
        2988837096408025971*(-1)^(30*w)*2^(2 + 30*w)*w - 
        100576014190670397*(-1)^(32*w)*2^(5 + 32*w)*w - 
        718299927351074541*(-1)^(33*w)*2^(1 + 33*w)*w - 
        71102556775239063*(-1)^(34*w)*2^(3 + 34*w)*w - 
        97652505760126179*(-1)^(35*w)*2^(1 + 35*w)*w - 
        14047340661916773*(-1)^(36*w)*2^(2 + 36*w)*w - 
        3196230674807313*(-1)^(37*w)*2^(2 + 37*w)*w - 
        257573624384457*(-1)^(38*w)*2^(3 + 38*w)*w - 375*(-1)^(2*w)*
         2^(36 + 2*w)*w^2 - 9375*(-1)^(3*w)*2^(35 + 3*w)*w^2 - 
        248625*(-1)^(4*w)*2^(33 + 4*w)*w^2 - 9251625*(-1)^(5*w)*2^(30 + 5*w)*
         w^2 - 134741475*(-1)^(6*w)*2^(28 + 6*w)*w^2 - 406874475*(-1)^(7*w)*
         2^(28 + 7*w)*w^2 - 16883176125*(-1)^(8*w)*2^(24 + 8*w)*w^2 - 
        19237369275*(-1)^(9*w)*2^(25 + 9*w)*w^2 - 1252191943395*(-1)^(10*w)*
         2^(20 + 10*w)*w^2 - 9194111039085*(-1)^(11*w)*2^(18 + 11*w)*w^2 - 
        61379864949825*(-1)^(12*w)*2^(16 + 12*w)*w^2 - 
        374382477056025*(-1)^(13*w)*2^(14 + 13*w)*w^2 - 
        2091252088783353*(-1)^(14*w)*2^(12 + 14*w)*w^2 - 
        334219173783303*(-1)^(15*w)*2^(15 + 15*w)*w^2 - 
        779572681372197*(-1)^(16*w)*2^(14 + 16*w)*w^2 - 
        51362842667337*(-1)^(17*w)*2^(18 + 17*w)*w^2 - 
        1535562934262871*(-1)^(18*w)*2^(13 + 18*w)*w^2 - 
        2428568682946695*(-1)^(19*w)*2^(12 + 19*w)*w^2 - 
        705565897554945*(-1)^(20*w)*2^(13 + 20*w)*w^2 - 
        40414125294135*(-1)^(21*w)*2^(14 + 21*w)*w^2 + 
        1117016096892507*(-1)^(22*w)*2^(12 + 22*w)*w^2 + 
        1106917052714679*(-1)^(23*w)*2^(13 + 23*w)*w^2 + 
        741092773641825*(-1)^(24*w)*2^(14 + 24*w)*w^2 + 
        1644899077814085*(-1)^(25*w)*2^(13 + 25*w)*w^2 + 
        3207731898397167*(-1)^(26*w)*2^(12 + 26*w)*w^2 + 
        2813936946906453*(-1)^(27*w)*2^(12 + 27*w)*w^2 + 
        1122356811960585*(-1)^(28*w)*2^(13 + 28*w)*w^2 + 
        204412933320975*(-1)^(29*w)*2^(15 + 29*w)*w^2 + 
        544181276924511*(-1)^(30*w)*2^(13 + 30*w)*w^2 + 
        659959328303613*(-1)^(31*w)*2^(12 + 31*w)*w^2 + 
        90645252839955*(-1)^(32*w)*2^(14 + 32*w)*w^2 + 
        89443786600725*(-1)^(33*w)*2^(13 + 33*w)*w^2 + 
        78212647635255*(-1)^(34*w)*2^(12 + 34*w)*w^2 + 
        14855435696121*(-1)^(35*w)*2^(13 + 35*w)*w^2 + 
        2377380942897*(-1)^(36*w)*2^(14 + 36*w)*w^2 + 
        609232949397*(-1)^(37*w)*2^(14 + 37*w)*w^2 + 56575850733*(-1)^(38*w)*
         2^(15 + 38*w)*w^2 + 47496476493*(-1)^(39*w)*2^(12 + 39*w)*w^2 + 
        92735881754103111609*(-2)^(19*w)*w^3 + 52221416014905877953*
         (-2)^(27*w)*w^3 + 8043589918816369713*(-2)^(31*w)*w^3 + 
        357790957421769*(-2)^(39*w)*w^3 + 5625*(-1)^(3*w)*2^(32 + 3*w)*w^3 + 
        39375*(-1)^(4*w)*2^(33 + 4*w)*w^3 + 579375*(-1)^(5*w)*2^(32 + 5*w)*
         w^3 + 47570625*(-1)^(6*w)*2^(28 + 6*w)*w^3 + 761929875*(-1)^(7*w)*
         2^(26 + 7*w)*w^3 + 2526811875*(-1)^(8*w)*2^(26 + 8*w)*w^3 + 
        230346120375*(-1)^(9*w)*2^(21 + 9*w)*w^3 + 1155156897375*(-1)^(10*w)*
         2^(20 + 10*w)*w^3 + 20748761460675*(-1)^(11*w)*2^(17 + 11*w)*w^3 + 
        84486575711475*(-1)^(12*w)*2^(16 + 12*w)*w^3 + 
        629866154633625*(-1)^(13*w)*2^(14 + 13*w)*w^3 + 
        4330346524128675*(-1)^(14*w)*2^(12 + 14*w)*w^3 + 
        110445406059393405*(-1)^(15*w)*2^(8 + 15*w)*w^3 + 
        164015274129364935*(-1)^(16*w)*2^(8 + 16*w)*w^3 + 
        1821633896828103975*(-1)^(17*w)*2^(5 + 17*w)*w^3 + 
        4741363734370027875*(-1)^(18*w)*2^(4 + 18*w)*w^3 + 
        13330058859459446769*(-1)^(20*w)*2^(3 + 20*w)*w^3 + 
        28866841163772599601*(-1)^(21*w)*2^(2 + 21*w)*w^3 + 
        29444501991257663481*(-1)^(22*w)*2^(2 + 22*w)*w^3 + 
        56586140479761167043*(-1)^(23*w)*2^(1 + 23*w)*w^3 + 
        12799623227801505993*(-1)^(24*w)*2^(3 + 24*w)*w^3 + 
        43577615935618521021*(-1)^(25*w)*2^(1 + 25*w)*w^3 + 
        2177537238568304487*(-1)^(26*w)*2^(5 + 26*w)*w^3 + 
        9145784741211232623*(-1)^(28*w)*2^(2 + 28*w)*w^3 + 
        5967172633089995361*(-1)^(29*w)*2^(2 + 29*w)*w^3 + 
        3608932692059041203*(-1)^(30*w)*2^(2 + 30*w)*w^3 + 
        128004262418032317*(-1)^(32*w)*2^(5 + 32*w)*w^3 + 
        943052144031222381*(-1)^(33*w)*2^(1 + 33*w)*w^3 + 
        96729278586898743*(-1)^(34*w)*2^(3 + 34*w)*w^3 + 
        138521442608636643*(-1)^(35*w)*2^(1 + 35*w)*w^3 + 
        20962714317942501*(-1)^(36*w)*2^(2 + 36*w)*w^3 + 
        5092249267586961*(-1)^(37*w)*2^(2 + 37*w)*w^3 + 
        448984192288329*(-1)^(38*w)*2^(3 + 38*w)*w^3))/
      (-1024 - (-1)^w*2^(11 + w) - 3*(-1)^(2*w)*2^(10 + 2*w) - 
        3*(-1)^(3*w)*2^(10 + 3*w) - (-1)^(4*w)*2^(11 + 4*w) + 
        (-1)^(6*w)*2^(11 + 6*w) + 3*(-1)^(7*w)*2^(10 + 7*w) + 
        3*(-1)^(8*w)*2^(10 + 8*w) + (-1)^(9*w)*2^(11 + 9*w) + 
        (-1)^(10*w)*2^(10 + 10*w) + 56793*(-2)^(5*w)*w + 50919*(-2)^(7*w)*w + 
        36039*(-2)^(8*w)*w + 7533*(-2)^(10*w)*w + 15*(-1)^w*2^(8 + w)*w + 
        105*(-1)^(2*w)*2^(7 + 2*w)*w + 885*(-1)^(3*w)*2^(5 + 3*w)*w + 
        11355*(-1)^(4*w)*2^(2 + 4*w)*w + 30243*(-1)^(6*w)*2^(1 + 6*w)*w + 
        9453*(-1)^(9*w)*2^(1 + 9*w)*w)^4
