Let z = s + i*t be a complex number with real part s and imaginary

part t. If s>1 we can define a function

zeta(z) = sum_n n^(-z),

where n runs over the positive integers. This function analytically

continues over the whole complex plane, giving a meromorphic function

with a single simple pole at z=1. The sum is absolutely convergent

for s>1, and we may pass in this case to a corresponding infinite

product

zeta(z)= prod_p (1 - p^(-z))^(-1),

where the product is taken over all primes p. This is the key to the

zeta function--it encodes information about the primes. If we take

logarithms, we get

ln(zeta(z))= sum_p -ln(1-p^(-z)) = sum_p ln(1+p^z + p^(2z)+p^3z+...)

The real part of this is the log of the absolute value

Re(ln(zeta(z)) = ln(|zeta(z)|) = sum_p ln(|1-p^(-z)|).

If we fix s and let t vary, then each term of the above sum becomes a

periodic function of t with period 2 pi / ln(p). If we look at the

first-order approximation, we have

ln(1+p^(-z)) ~ p^(-z) = p^(-s) (cos(ln(p) t) - i sin(ln(p) t)),

so that the real part of ln(zeta(z)) is approximately

sum_p p^(-s) cos(ln(p) t)

If we rescale by setting t = 2 pi n /ln(2), we get a sum weighted by

factors of 1/p^s of cosine functions with periods of log_2(p). If n

is a real number near a good et (e.g. n=12.018) then for the smallest

primes, which have the highest weight, we will simultaneously be near

a peak value of several of these cosine functions. The functions we

are actually summing are also periodic but not exactly cosines; they

in fact are an improvement, which take into account the powers of the

prime p and so sharpen the peaks near their maximum, particularly for

the smaller primes where we are especially concerned to accurately

represent prime powers.

Since the infinite product converges when s>=1, we are justified in

taking values of

t=2 pi n /ln(2) which give relatively high maximums for the fixed

value of s as representing good scale divisions. As s goes to

infinity, this becomes increasingly a matter of finding good values

for the fifth, which we can much more easily accomplish via a

continued fraction. More interesting are the cases with smaller

values of s, as these give more weight to the larger primes and prime

powers.

It is a little harder to justify taking s into the critical strip

between 0 and 1. However, the fact of analytic continuation and the

Riemann-Siegel formula helps to make sense of this also, at least up

to the critical line s=1/2; this is particularly the case if the

Riemann hypothesis is true, in which case ln(zeta(z)) is analytic in

the strip up to the critical line. We have a functional equation

relating values of s to values of 1/2-s, so we don't want to push it

past the critical line in any case. When we continue past s=1, we may

follow a line of steepest ascent up to a high value of absolute value

for zeta, and particularly when we get a good et which does well for

a number of primes we might expect to reach a high maximum.

We may adjust the zeta function along the critical line by setting

Z(t) = zeta(1/2 + i t) pi^(-i t) Gamma(1/4 + i t/2)/|Gamma(1/4 + i

t/2)|

this makes Z into a real function of the real variable t, whose

absolute value is the same as that of zeta(1/2+i t). Here Gamma is

the Gamma function, where Gamma(z) = (z-1)! for complex z.

We have an approximate formula for Z,

Z(t) ~ 2 sum_{n <= L} cos(t ln(n) - theta(t))/sqrt(n)

where L = sqrt(t / 2 pi) and theta has an asymptotic expression

theta(t) ~~ (t/2) ln(t / 2 pi) - t/2 - pi/8 + 1/ (48 t) + 7/(5760

t^3) + ...

which is extremely accurate for our purposes.

We see that if theta(t) is a multiple of pi, we have again a weighted

sum of cosines. Hence we are justified at looking at maximums of Z(t)

particularly at "Gram points", which are points where theta(t) is an

integer multiple of pi and so cos(theta(t))=+-1, sin(theta(t))=0. If

we divide theta by pi and set r = t / 2 pi, we get

f(r) = theta(t / 2 pi)/pi ~ r ln(r) - r - 1/8

and Gram points will be integer values of f(r). We can then use

Newton's method to find the Gram point near a value of r where f(r)

is close to an integer G. In this case, if we ignore the terms in

inverse powers of r in the asymptotic formula we simply need iterate

r' = (G + r + 1/8) / ln(r)

If n is the number of steps in an n-et, then r = n/ln(2). For

example, if n=12 then r=17.32... and f(r) = 31.927..., so we pick the

Gram point where G=32. Applying Newton's method, we get an adjusted

value r=17.337... which corresponds to n=12.017..., where octaves are

flat by 1.764... cents. We may call such a tuning a Gram tuning, and

it is interesting to consider what the flatness or sharpness of the

Gram tuning for a given et is telling us, and whether they make

practical sense.

I found an amazing applet on the web, which will graph Z(t) for

anyone who wants to investigate this. (Don't you just love Java?)

Unfortunately, it isn't set up for microtonalists, but if you

multiply your et n by the magic number 2 pi / ln(2), you get a value

of t which corresponds to that et and around which it is interesting

to consider the graph. Maybe if we ask nicely he will put up a

version for music theorists; he might be interested by the interest!

The url is:

http://www.math.ubc.ca/~pugh/RiemannZeta/RiemannZetaLong.html