Lecture Note
University
Augusta UniversityCourse
MATH 4800 | Secondary Mathematics from an Advanced PerspectivePages
3
Academic year
2023
Aries Dlogok
Views
0
Date General prime NumBers CEP (L) : For K E1..L is. (Primek License 1 KE2 while jSL j&k2 while JCL is -Primep;to - J tjik KE K+1 j&1 For KE 1..L if is primek=1 Primejt K J return Prime it is well known that the segmented vasion of the Seive of eratosthenes, with basic optimizations, suscro (L) operations and (VE 109(109(L)) (L) log KIKY CS Dinindai dengan CamScanner
Date GENERATING PRIME NUMBERS Program 1.2. This program is a better Version of Program 1.1 because It Fots O only on the odd Positions OF the Vector is Ame (EPi(L) := For KE 3,5.1 L 1 is. Primekt 1 For KE 3.5.floor(VT) For I Ek2, K2 +2K..L is Prime; & O Prime1 2 j-2 For l K E 1.3.L if is. Primek=1 Prime K j4jt1 return Prime Program 1.3. This Program is a better version of Program 1-2 because it user aminimal memory space. CEPm (L) := At Floor (1) for KEI l is prime K t 1 For KE 3.5. floor (VT) forj E k2 k2+2k L is Prime j-L k 0 2 KIKY CS Dipindai dengan CamScanner
Date Prime,4-2 j-2 for k E1..> -1 if is_prime K = 1 Prime; & 2. kt1 j J+1 return Prime Even the execution time OF the Frogram 1.3 isa little long IT than OF the program 1.2 the best linear variant of the seive OF eratosthenes is the Program 1.3 of is Provides an important memorycoormy (11270607) memory locations mstead OF 21270607, the amat OF memory locations used by program 1.1 and 1.27
General Prime Numbers
Please or to post comments