Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,15 +1,22 @@
|
|||
fastfunc isprim num .
|
||||
i = 3
|
||||
while i <= sqrt num
|
||||
if num mod i = 0 : return 0
|
||||
i += 2
|
||||
n = 10e7
|
||||
len sieve[] n
|
||||
fastproc mksieve .
|
||||
max = sqrt len sieve[]
|
||||
for i = 2 to max : if sieve[i] = 0
|
||||
j = i * i
|
||||
while j <= len sieve[]
|
||||
sieve[j] = 1
|
||||
j += i
|
||||
.
|
||||
.
|
||||
return 1
|
||||
.
|
||||
mksieve
|
||||
#
|
||||
fastfunc nextprim n .
|
||||
if n < 2 : return 2
|
||||
repeat
|
||||
n += 2
|
||||
until isprim n = 1
|
||||
n += 1
|
||||
until sieve[n] = 0
|
||||
.
|
||||
return n
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
-- 12 Apr 2025
|
||||
include Settings
|
||||
-- 24 Aug 2025
|
||||
include Setting
|
||||
|
||||
call Time('r')
|
||||
say 'STRONG AND WEAK PRIMES'
|
||||
|
|
@ -50,6 +50,4 @@ say n 'found'
|
|||
say
|
||||
return
|
||||
|
||||
include Sequences
|
||||
include Functions
|
||||
include Abend
|
||||
include Math
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue