All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Prime centuries 2 (Posted on 2024-09-19) Difficulty: 3 of 5
What are 19 consecutive 4-digit primes such that the difference between the greatest prime and the least prime is less than 100?

No Solution Yet Submitted by Math Man    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution (spoiler) Comment 1 of 1
p=setdiff(primes(9999),primes(999));
for i=1:length(p)-18
  if p(i+18)-p(i)<100
    fprintf('%4d ',p(i:i+18))
    fprintf('\n')
  end
end

finds

2657 2659 2663 2671 2677 2683 2687 2689 2693 2699 2707 2711 2713 2719 2729 2731 2741 2749 2753 


  Posted by Charlie on 2024-09-19 08:00:34
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information