You are calculating F(1/z) using standard scientific programming function calls (just directly calculating the function as specified using a standard function for the incomplete gamma function). In our setting, this isn't necessary; for positive integer k the sum form of the incomplete gamma function is just a polynomial scaled by some elements that cancel in our function (see https://dlmf.nist.gov/8.4#E8 for details). For k=2 (the only value that presently applies) this whole mess simplifies to an unbelievably simple polynomial: F(z) = 2 z^3 + 2 z^2 + z. You can just use this polynomial instead of the fancy math calls.