The primes from 500 to 599 are 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599. Therefore, there are 14 primes in the 500's.
1. Which century out of the centuries 500-599, 600-699, ..., 1400-1499 has the most primes?
2. Which century has the least primes?
3. Which century out of the 500's, 600's, ..., 1400's takes the shortest to get to the second prime in the century?
4. Which century takes the longest to get to the second prime?
5. What story involving 2 animals is this an example of?
boundary=500:100:1500;
for i=1:length(boundary)-1
pr=setdiff(primes(boundary(i+1)),primes(boundary(i)));
fprintf('%4d''s %3d %4d %4d\n',boundary(i),length(pr),pr(1),pr(2))
end
yields
cent count first second
500's 14 503 509
600's 16 601 607
700's 14 701 709
800's 15 809 811
900's 14 907 911
1000's 16 1009 1013
1100's 12 1103 1109
1200's 15 1201 1213
1300's 11 1301 1303
1400's 17 1409 1423
The 1400' have the most primes, 17.
The 1300's have the least, 11.
The 1400's have the latest second prime, 23 years after the zero year.
The 1300's have the earliest second prime, 3 years after the zero year.
The 1400's were the tortoise and the 1300's were the hare.
|
Posted by Charlie
on 2024-06-04 14:16:18 |