Dr. Robert Harley on Tue, 6 May 2003 17:30:00 +0200 (CEST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Rademacher formula for p(n) with PARI


Another remark:

The following formula (which appears to be more efficient) for the
first factor of the terms appears (essentially) in Lehmer's paper:

  partfac1(q, n) = local(rb); sum(r = 0, q-1, if(gcd(r, q)>1, 0, rb = lift(1/Mod(r, q)); cos(if(q%2, -24*n*r-6*q*kronecker(-r, q)-3*q*(q-3)-(sqr(q)-1)*(2*r+rb-sqr(r)*rb), -24*n*r-6*q*kronecker(-q, r)+r*(q+1)*(q+2)+(sqr(q)-1)*(sqr(r)-1)*rb)*Pi/12/q)))

There are also some interesting multiplication theorems to reduce to
the case where q is a prime power... surely these would be useful for
implementation. :-/

Bye,
  Rob.
     .-.                                                               .-.
    /   \           .-.                                 .-.           /   \
   /     \         /   \       .-.     _     .-.       /   \         /     \
  /       \       /     \     /   \   / \   /   \     /     \       /       \
 /         \     /       \   /     `-'   `-'     \   /       \     /         \
            \   /         `-'                     `-'         \   /
             `-'                                               `-'