On Sunday 01 January 2012 23:33:19 Dan Asimov wrote:
Using mere long doubles in C, here are the fracfac coefficients that I believe, for 1/p, p prime <= 19.
Apparently, we always have:
a) (p-1)/2 is the coefficient of 1/(p-2)! (for p > 3),
b) 0 is the coefficient of 1/(p-1)!, and
c) p-1 is the coefficient of 1/p!.
Can someone give a nice proof of these apparent patterns?
I don't know about "nice", but the following is very straightforward. We have 1/p = a2/2! + a3/3! + ... + ap/p! (p-1)! = a2 (p!/2!) + a3 (p!/3!) + ... + ap Working mod p and applying Wilson's theorem gives your (c). Call the last few coefficients ..., x, y, z. Then we have (p-1)! = p-1 + p(y + (p-1)(x + (p-2)T)) for some T. Now everything except py is a multiple of p-1, so py is too, so y is; since 0 <= y < p-1, we must in fact have y=0. And now we have (p-1)! = p-1 + p(p-1)(x + (p-2)T) (p-2)! = 1 + p(x + (p-2)T) so working mod p-2 we have 0 = 1 + px = 1 + 2x Since p-2 is odd, there is a unique x satisfying this, namely (p-3)/2. (Not (p-1)/2, which presumably was a typo.) -- g