Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,24 @@
|
|||
func prime_gap_records(upto) {
|
||||
|
||||
var gaps = []
|
||||
var p = 3
|
||||
|
||||
each_prime(p.next_prime, upto, {|q|
|
||||
gaps[q-p] := p
|
||||
p = q
|
||||
})
|
||||
|
||||
gaps.grep { defined(_) }
|
||||
}
|
||||
|
||||
var gaps = prime_gap_records(1e8)
|
||||
|
||||
for m in (1 .. gaps.max.len) {
|
||||
gaps.each_cons(2, {|p,q|
|
||||
if (abs(q-p) > 10**m) {
|
||||
say "10^#{m} -> (#{p}, #{q}) with gaps (#{
|
||||
p.next_prime-p}, #{q.next_prime-q}) and difference #{abs(q-p)}"
|
||||
break
|
||||
}
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue