Georgi Guninski on Mon, 22 Jan 2024 11:51:58 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

`primepi()` is significantly slower that sage's `primepi()`


`primepi()` is significantly slower that sage's `primepi()`

? primepi(10^11)
%59 = 4118054813
? ##
  ***   last result computed in 5,285 ms.

in sage:

sage: time prime_pi(10**11)
CPU times: user 31.3 ms, sys: 0 ns, total: 31.3 ms
Wall time: 48.3 ms
4118054813

This was caught from the mathoverflow question:
https://mathoverflow.net/questions/462609/on-the-primality-of-jn-varphip-n1-n1-when-jn-equiv-19-pmod-100#462638
On the primality of j(n)=φ(p_n+1−n)+1 when j(n)≡19(mod 100)