Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,17 @@
func is_long_prime(p) {
for d in (divisors(p-1)) {
if (powmod(10, d, p) == 1) {
return (d+1 == p)
}
}
return false
}
say "Long primes ≤ 500:"
say primes(500).grep(is_long_prime).join(' ')
for n in ([500, 1000, 2000, 4000, 8000, 16000, 32000, 64000]) {
say ("Number of long primes ≤ #{n}: ", primes(n).count_by(is_long_prime))
}

View file

@ -0,0 +1,3 @@
func is_long_prime(p) {
znorder(10, p) == p-1
}