Content deleted Content added
Line 96:
:<math>\pi(k) =1 + \sum_{j=2}^k 1+\left\lfloor {-1
Line 106:
\end{cases} </math>
:<math>\sum_{s=
1 & \text{s divides j} \\▼
:<math>\left\lfloor {-1 \over j} \left(\sum_{s=2}^{\left\lfloor\sqrt{j}\right\rfloor} \left(\left\lfloor{ j \over s}\right\rfloor - \left\lfloor{j-1 \over s}\right\rfloor\right) \right)\right\rfloor=\begin{cases}
0 & \text{s does not divide j}▼
0 & \text{j is prime} \\
\end{cases} </math>▼
-1 & \text{j is composite}
:<math>IsPrime(x)=1+\left\lfloor {-1 \over j} \left(\sum_{s=2}^{\left\lfloor\sqrt{j}\right\rfloor} \left(\left\lfloor{ j \over s}\right\rfloor - \left\lfloor{j-1 \over s}\right\rfloor\right) \right)\right\rfloor=\begin{cases}
\end{cases}</math>
:<math>\pi(k) =\sum_{j=2}^k IsPrime(j) </math>
===Converting primality tests to prime number formulas===
|