Riemann–Siegel theta function
It has an asymptotic expansion
which is not convergent, but whose first few terms give a good approximation for . Its Taylor-series at 0 which converges for is
where denotes the Polygamma function of order . The Riemann–Siegel theta function is of interest in studying the Riemann zeta function, since it can rotate the Riemann zeta function such that it becomes the totally real valued Z function on the critical line .
Curve discussion 
The Riemann–Siegel theta function is an odd real analytic function for real values of t. It has 3 roots at 0 and and it is an increasing function for values |t| > 6.29, because it has exactly one minima and one maxima at with absolute value . Lastly it has a unique inflection point at t=0 with where the theta function has its derivation minimum.
Theta as a function of a complex variable 
We have an infinite series expression for the log Gamma function
where γ is Euler's constant. Substituting for z and taking the imaginary part termwise gives the following series for θ(t)
For values with imaginary part between -1 and 1, the arctangent function is holomorphic, and it is easily seen that the series converges uniformly on compact sets in the region with imaginary part between -1/2 and 1/2, leading to a holomorphic function on this domain. It follows that the Z function is also holomorphic in this region, which is the critical strip.
We may use the identities
to obtain the closed-form expression
which extends our original definition to a holomorphic function of t. Since the principal branch of log Γ has a single branch cut along the negative real axis, θ(t) in this definition inherits branch cuts along the imaginary axis above i/2 and below -i/2.
Gram points 
The Riemann zeta function on the critical line can be written
Hence the zeta function on the critical line will be real when . Positive real values of where this occurs are called Gram points, after J. P. Gram, and can of course also be described as the points where is an integer.
A Gram point is a solution of
Here are the smallest non negative Gram points
The choice of the index n is a bit crude. It is historically chosen in such a way that the index is 0 at the first value which is larger than the smallest positive zero (at imaginary part 14.13472515 ...) of the Riemann zeta function on the critical line. Notice, this -function oscillates for absolute-small real arguments and therefore is not uniquely invertible in the interval [-24,24]! Thus the odd theta-function has its symmetric Gram point with value 0 at index -3. Gram points are useful when computing the zeros of . At a Gram point ,
and if this is positive at two successive Gram points, must have a zero in the interval.
The number of roots, , in the strip from 0 to T, can be found by
where is an error term which grows asymptotically like .
Only if would obey Gram’s law, then finding the number of roots in the strip simply becomes
Today we know, that in the long run, Gram's law fails for about 1/4 of all Gram-intervals to contain exactly 1 zero of the Riemann zeta-function. Gram was afraid that it may fail for larger indices (the first miss is at index 126 before the 127th zero) and thus claimed this only for not too high indices. Later Hutchinson coined the phrase Gram's law for the (false) statement that all zeroes on the critical line would be separated by Gram points.