Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Taking your corrections into account, I think we can conjecture that $$\lim_{k' \to k}x^{-k'}I_{k'}(x)= (x-1) \left(\sum_{i=0}^k \frac{H_{k+1} - H_i}{x^{i+1}}\right) - 2 \tanh^{-1}(1-2x)$$
And, in the same way that Fibonacci number calculation by matrix powers can be optimised, this can be optimised with the recurrences $T_{2n} = 2 T_n{}^2 - 1$ and $T_{2n+1} = 2 T_n T_{n+1} - x$
The permutations with $D(\pi) = 0$ are the identity permutation and the reverse permutation. The number of permutations with $D(\pi) = 1$ starts $0,0,4,22,82,240,520,960,1590, 2442$ (from $n=1$ to $n=10$) and is not in OEIS.
@user144684, I'm not sure what misfire of the brain caused me to see that as an exponential relationship. Trying to find the appropriate term to correct it to.
Hmm. These examples are all exponential (specifically, $f(2x) = 2f(x)$). I should be able to enumerate exponential functions much more efficiently, so I can check whether this class extends to $GF(127)$...
Incidentally, since there's no use of multiplication in the definition of these functions, it just occurred to me to try searching for suitable functions over $Z_{15}$, and there is one pair, with representative $0(1,4)(2,8)(3,14)(5,10)(6,13)(7,9)(11,12)$.