Sundaram sieve
考虑如下无限矩阵, 每一行都是等差数列, 公差依次是 3,5,7,9,11,...
\begin{matrix} 4&7&10&13&16&\cdots\\ 7&12&17&22&27&\cdots\\ 10&17&24&31&38&\cdots\\ 13&22&31&40&49&\cdots\\ 16&27&38&49&60&\cdots\\ \vdots&\vdots&\vdots&\vdots&\vdots& \end{matrix} 证明 $2n+1$ 是素数当且仅当 $n$ 不在上面的矩阵中.
\begin{matrix} 4&7&10&13&16&\cdots\\ 7&12&17&22&27&\cdots\\ 10&17&24&31&38&\cdots\\ 13&22&31&40&49&\cdots\\ 16&27&38&49&60&\cdots\\ \vdots&\vdots&\vdots&\vdots&\vdots& \end{matrix} 证明 $2n+1$ 是素数当且仅当 $n$ 不在上面的矩阵中.