\documentclass[12pt]{article}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}

\usepackage{tikz}
\usepackage{graphicx}
\usepackage[top=1in,left=1in,right=1in,bottom=1in]{geometry}

\newcommand{\lbar}[1]{\overline{#1}}
\newcommand{\RR}[0]{\mathbb{R}}
\newcommand{\ZZ}[0]{\mathbb{Z}}
\newcommand{\CC}[0]{\mathbb{C}}

\newcommand{\ZNtR}{\operatorname{ZNtR}}

\title{An Experimental Mathematics Approach to Truncated Riemann Zeta Function}
\author{Edna L.\ Jones \and Yukun Yao \and Doron Zeilberger}

\begin{document}
\maketitle

\begin{abstract}
As a case study and class project of experimental mathematics, we implemented efficient programs to compute truncated Riemann Zeta functions and find minimums for the absolute value of Truncated Riemann Zeta Function. The details of programs and results are discussed. Future work may include approximation by continued fraction and the asymptotic estimates which are briefly mentioned here. 
\end{abstract}
\leavevmode
\\
\\
\\

\section*{Accompanying Maple Packgages}

This article is accompanied by the Maple packages,
{\tt TruncatedRiemannZeta.txt}, available from
the front, the web-page
\\

{\tt http://sites.math.rutgers.edu/\~{}yao/Truncated/TruncatedRiemannZeta.txt}
\leavevmode
\\
\\

\section*{Introduction}
As is well known, Riemann Zeta Function $\zeta(s) = \sum_{n=1}^\infty \frac{1}{n^s} $. In this article, we consider truncated Riemann Zeta Function, and especially the square of its absolute value $\ZNtR$ on the critical line $Re(z) = 1/2$, which is defined to be
\begin{align*}
\ZNtR(N, t) = \left| \sum_{n=1}^N \frac{1}{n^{1/2 + i t}}\right|^2
\end{align*}
for a positive integer $N$ and a real number $t$.

Generally our method, as an experimental mathematics approach to number theory, is finitistic and numeric. With powerful Maple, we use numeric programs to compute the square of absolute value of truncated Riemann Zeta function at first and then try to find the approximation of its minimum points, which are candidates for zeroes of truncated Riemann Zeta function. 

We note that
\begin{align*}
\ZNtR(N, t) &= \left| \sum_{n=1}^N \frac{1}{n^{1/2 + i t}}\right|^2 = \sum_{n_1=1}^N \frac{1}{n_1^{1/2 + i t}} \sum_{n_2=1}^N \frac{1}{n_2^{1/2 - i t}} \\
	&= \sum_{n=1}^N \frac{1}{n} + \underset{1 \le n_1 < n_2 \le N}{\sum \sum} \left(\frac{1}{n_1^{1/2+it}} \frac{1}{n_2^{1/2-it}} + \frac{1}{n_2^{1/2+it}} \frac{1}{n_1^{1/2-it}}\right) \\
	&= \sum_{n=1}^N \frac{1}{n} + \underset{1 \le n_1 < n_2 \le N}{\sum \sum} \left( e^{-\ln(n_1) (1/2 + it)} e^{-\ln(n_2) (1/2 - it)} + e^{-\ln(n_2) (1/2 + it)} e^{-\ln(n_1) (1/2 - it)} \right) \\
	&= \sum_{n=1}^N \frac{1}{n} + \underset{1 \le n_1 < n_2 \le N}{\sum \sum} \left( e^{-(\ln(n_1) + \ln(n_2))/2  + it (\ln(n_2) - \ln(n_1))} + e^{-(\ln(n_1) + \ln(n_2))/2  - it (\ln(n_2) - \ln(n_1))} \right) \\
	&= \sum_{n=1}^N \frac{1}{n} + \underset{1 \le n_1 < n_2 \le N}{\sum \sum} e^{-(\ln(n_1) + \ln(n_2))/2} \left( e^{it (\ln(n_2) - \ln(n_1))} + e^{-it (\ln(n_2) - \ln(n_1))} \right) \\
	&= \sum_{n=1}^N \frac{1}{n} + 2 \underset{1 \le n_1 < n_2 \le N}{\sum \sum} \frac{1}{\sqrt{n_1 n_2}} \cos(t (\ln(n_2) - \ln(n_1))).
\end{align*}

The truncated Riemann Zeta function is not necessarily a good approximation for the Riemann zeta function on the critical line. To begin with, $|\zeta(1/2)|^2 \approx 2.132635292$ (according to Maple). However,
\begin{align*}
\lim_{t \to 0} \ZNtR(N, t) &= \lim_{t \to 0} \left( \sum_{n=1}^N \frac{1}{n} + 2 \underset{1 \le n_1 < n_2 \le N}{\sum \sum} \frac{1}{\sqrt{n_1 n_2}} \cos(t (\ln(n_2) - \ln(n_1))) \right) \\
	&= \sum_{n=1}^N \frac{1}{n} + 2 \underset{1 \le n_1 < n_2 \le N}{\sum \sum} \frac{1}{\sqrt{n_1 n_2}} \cos(0 (\ln(n_2) - \ln(n_1))) \\
	&= \sum_{n=1}^N \frac{1}{n} + 2 \underset{1 \le n_1 < n_2 \le N}{\sum \sum} \frac{1}{\sqrt{n_1 n_2}},
\end{align*}
which tends to infinity as $N \to \infty$. This implies that the truncated Riemann Zeta functions $\ZNtR(N,t)$ are not good approximations for $\zeta(1/2 + it)$ when $t$ is small.

However, the truncated Riemann Zeta function, by itself, is an interesting topic to explore. And compared to Riemann Zeta function, it is more accessible from experimental mathematics viewpoint. 

Following is a picture of normalized zeroes of the fifth partial sum of Riemann Zeta function from [1]. 

\begin{figure}[h!]
  \caption{10,000 normalized zeros of $\zeta_5(s)$}
  \includegraphics[width=\textwidth]{zero.jpg}
\end{figure}


\leavevmode
\\
\\

\section*{Minimum Points and Values}
To find out the minimal points points and values of truncated Riemann Zeta function, at first we will need an efficient program to calculate the truncated Riemann Zeta function. With the ZNtR function mentioned in last function, we can calculate the square of absolute value of truncated Riemann Zeta function without involving imaginary numbers. The following is the {\tt naive} Maple procedure {\tt ZNt} for the real part of truncated Riemann Zeta function zeta\_N(1/2+I*t)*zeta\_N(1/2-I*t) where zeta\_N means the truncated Riemann Zeta function up to N.

{\obeylines
{\tt
ZNt:=proc(N,t) local n:
Re(add(1/n**(1/2+I*t),n=1..N)*add(1/n**(1/2-I*t),n=1..N));
end:
}
}

Here is a picture of ZNt(5,t):
\begin{figure}[h!]
  \caption{Picture of ZNt(5,t)}
  \includegraphics[width=\textwidth]{p1.jpg}
\end{figure}

To get rid of imaginary numbers, we have another Maple procedure {\tt ZNtR} which outputs the real part of zeta\_N(1/2+I*t)*zeta\_N(1/2-I*t) without using imaginary numbers.

{\obeylines
{\tt
ZNtR:=proc(N,t) local n1,n2:
add(evalf(1/n),n=1..N)+2*add(add( evalf(1/sqrt(n1*n2)*cos((log(n2)-log(n1))*t)), n2=n1+1..N), n1=1..N):
end:
}
}

Here is a picture of ZNtR(10,t):
\begin{figure}[h!]
  \caption{Picture of ZNtR(10,t)}
  \includegraphics[width=\textwidth]{p2.jpg}
\end{figure}

From the above pictures we can see that the graph oscillates above (and on) the $x$-axis and there are lots of local minimums. Those minimums which are very close to the $x$-axis are candidates for zeros of the truncated Riemann Zeta function. So we need numerical methods to find out local minimums and possible zeros. 

For instance, in our package, there is a procedure {\tt FindIC(f,t,T,res)} which inputs a non-negative function $f$ of $t$, and a positive number $T$ and a resolution $res$, and finds approximation minimum.

{\obeylines
{\tt
FindIC:=proc(f,t,T,res) local i,ej,L:
ej:=evalf([seq(subs(t=res*i,f),i=0..trunc(T/res))]):
L:=[]:
for i from 2 to nops(ej)-1 do
  if ej[i]<ej[i-1] and ej[i]<ej[i+1] then
   L:=[op(L),i*res]:
  fi:
od:
L:
end:
}
}

{\tt FindIC(ZNtR(10, t), t, 100, 0.01)} outputs [2.24, 4.54, 7.11, 10.01, 14.50, 20.98, 25.14, 30.50, 33.05, 37.52, 40.97, 43.39, 47.96, 49.80, 52.91, 56.35, 59.22, 60.62, 65.36, 67.06, 69.45, 72.00, 76.19, 78.58, 83.56, 86.01, 88.33, 92.95, 95.34, 98.97].



With {\tt RN(f,t,t0,N,err)}, we can also estimate the closest zero of $f$ of $t$ to $t_0$ as soon as two consecutive iterations are less than $err$ apart, or we reached $N$ iterations and return FAIL.

{\obeylines
{\tt
RN:=proc(f,t,t0,N,err) local t1,t2,t3,i:
t1:=t0:
t2:=evalf(OneS(f,t,t1)):
for i from 2 to N do
 t3:=evalf(OneS(f,t,t2)):
 t1:=t2:
 t2:=t3:
  if abs(t1-t2)<err then
     RETURN(t2):
  fi:
od:
FAIL:
end:
}
}

{\tt RN(ZNtR(10, t), t, 14, 10000, 1)} returns 14.440145425364838529.

There are additional numeric procedures in our Maple package and readers are welcome to explore by themselves. 

\leavevmode
\\
\\



\section*{Asymptotic Estimates and Higher Moments}

To estimate the summation when $N$ and $t$ are large, we use integrals instead of finite sums. Following is the Maple procedure {\tt AsyTRZ} which inputs large $N$ and $t$ and estimate truncated Riemann Zeta function using integral.

{\obeylines
{\tt
AsyTRZ:=proc(N,t) local n, n1, n2,ans:
ans:=int(1/n, n=1..N) + 2*int(int(1/sqrt(n1*n2)*cos(t*(ln(n2)-ln(n1))), n1=1..n2), n2=1..N):
Re(evalf(ans)):
end:
}
}

For instance, {\tt AsyTRZ(100, 100)} = 4.6158105011697512898.
\begin{figure}[h!]
  \caption{Picture of AsyTRZ(100, t) for t from 100 to 200}
  \includegraphics[width=\textwidth]{p3.jpg}
\end{figure}

\begin{figure}[h!]
  \caption{Picture of AsyTRZ(100, t) for t from 500 to 5000}
  \includegraphics[width=\textwidth]{p4.jpg}
\end{figure}

Similarly, for fixed $t$, we can look at the trend when $N$ gets larger. For higher moments, the method is similar, but the integrand will be more complex and the calculation will take longer. 

More sophisticated numerical and experimental analysis of truncated Riemann Zeta function can be performed. For example, since abs(Zeta\_N(1/2+I*t))**2  is ``almost'' a trigonometic polynomial, but with irrational (in fact transcendental) frequencies, (involving log(n) for n small positive integers), we may use continued fractions to approximate the log by rational numbers, and make approximations for ZNtR(N,t) (for a given $N$) that is a linear combination of cos(rational*t). These are periodic (with large, but finite, period), so its absolute minimum should be calculable. Then by bounding the ``error'' possibly we can establish rigorously the absolute minimum of ZNtR(N,t), and in particular prove that is strictly positive. We leave this as an exercise for readers. 

\begin{figure}[h!]
  \caption{Picture of AsyTRZ(N, 100) for N from 100 to 500}
  \includegraphics[width=\textwidth]{p5.jpg}
\end{figure}


\leavevmode
\\
\\

\section*{Acknowledgement}
We'd like to thank all other members in the Experimental Mathematics class in Spring 2018 for their helpful discussions and suggestions and the wonderful semester we shared. 
\leavevmode
\\
\\

{\bf Reference}

[1] P. Borwein, G. Fee, R. Ferguson, and A. van der Waall, {\it Zeros of partial sums of the Riemann zeta function}, Experiment. Math. {\bf 16(1)} (2007) 21-39.
 
[2] Henryk Iwaniec, {\it ``Lectures on the Riemann Zeta Function''}, American Mathematical Society, 2014.

[3] J. van de Lune and H. J. J. te Riele, {\it Numerical computation of special zeros of partial sums of Riemann’s zeta function}, Computational methods in number theory, Part II, vol. 155 of Math. Centre Tracts, 371–387.

[4]E. Dubon, G. Mora, J. M. Sepulcre, J. I. Ubeda and T. Vidal, {\it A note on the real projection of partial sums of Riemann zeta function}, RACSAM {\bf 108} (2014) 317–333.

[5] S. M. Gonek and A. H. Ledoan, {\it Zeros of partial sums of the Riemann zeta-function}, Int. Math. Res. Not. IMRN {\bf 10} (2010) 1775–1791.

[6] S. M. Gonek and H. L. Montgomery, {\it Zeros of a family of approximations of the Riemann zeta-function}, Int. Math. Res. Not. IMRN {\bf 20} (2013) 4712–4733.

[7] H. L. Montgomery, {\it Zeros of approximations to the zeta function}, P. Erdos, editor, Studies
in Pure Mathematics: to the Memory of Paul Turan (1983), 497-506.

[8] D.J. Platt and T.S. Trudgian, {\it Zeros of partial sums of the zeta-function}, LMS Jour. Comp. Math. {\bf 19} (2016) 37-41.

\end{document}