# 素数公式

## 多项式形式的素数公式

${\displaystyle f(n)=n^{2}+n+41}$

P(n) = 5283234035979900n + 43142746595714191（

## 丢番图方程形式的素数公式

${\displaystyle 0=wz+h+j-q}$
${\displaystyle 0=(gk+2g+k+1)(h+j)+h-z}$
${\displaystyle 0=16(k+1)^{3}(k+2)(n+1)^{2}+1-f^{2}}$
${\displaystyle 0=2n+p+q+z-e}$
${\displaystyle 0=e^{3}(e+2)(a+1)^{2}+1-o^{2}}$
${\displaystyle 0=(a^{2}-1)y^{2}+1-x^{2}}$
${\displaystyle 0=16r^{2}y^{4}(a^{2}-1)+1-u^{2}}$
${\displaystyle 0=n+l+v-y}$
${\displaystyle 0=(a^{2}-1)l^{2}+1-m^{2}}$
${\displaystyle 0=ai+k+1-l-i}$
${\displaystyle 0=((a+u^{2}(u^{2}-a))^{2}-1)(n+4dy)^{2}+1-(x+cu)^{2}}$
${\displaystyle 0=p+l(a-n-1)+b(2an+2a-n^{2}-2n-2)-m}$
${\displaystyle 0=q+y(a-p-1)+s(2ap+2a-p^{2}-2p-2)-x}$
${\displaystyle 0=z+pl(a-p)+t(2ap-p^{2}-1)-pm.}$

## 带高斯符號的素数公式

### Mills公式

${\displaystyle [A^{3^{n}}\;]}$

### 威尔逊定理的利用

${\displaystyle \pi (m)=\sum _{j=2}^{m}{\frac {\sin ^{2}({\pi \over j}(j-1)!^{2})}{\sin ^{2}({\pi \over j})}}}$

${\displaystyle \pi (m)=\sum _{j=2}^{m}\left[{(j-1)!+1 \over j}-\left[{(j-1)! \over j}\right]\right].}$

${\displaystyle p_{n}=1+\sum _{m=1}^{2^{n}}\left\lbrack \left\lbrack {n \over 1+\pi (m)}\right\rbrack ^{1 \over n}\right\rbrack .}$

### 另一个用高斯函数的例子

${\displaystyle \pi (k)=k-1+\sum _{j=2}^{k}\left\lbrack {2 \over j}\left(1+\sum _{s=1}^{\left\lbrack {\sqrt {j}}\right\rbrack }\left(\left\lbrack {j-1 \over s}\right\rbrack -\left\lbrack {j \over s}\right\rbrack \right)\right)\right\rbrack }$

${\displaystyle p_{n}=1+\sum _{k=1}^{2(\lbrack n\ln(n)\rbrack +1)}\left(1-\left\lbrack {\pi (k) \over n}\right\rbrack \right).}$

## 递推关系

${\displaystyle a_{n}=a_{n-1}+\operatorname {gcd} (n,a_{n-1}),\quad a_{1}=7,}$

## 其他公式

### 威尔逊定理衍生公式

${\displaystyle f(n)=2+(2n!\;{\pmod {n+1}})}$

## 參考資料

1. ^ PrimeGrid’s AP26 Search (PDF). [2015-03-07]. （原始内容存档 (PDF)于2020-09-21）.