mersenneforum.org Prime95 finding any prime?
 Register FAQ Search Today's Posts Mark Forums Read

 2018-09-16, 18:07 #1 Tamay82   Aug 2018 5 Posts Prime95 finding any prime? Hello Prime95 can you help me I want to find any prime number? What can I do if I want to find eg, 23 is a prime number ?
 2018-09-16, 18:35 #2 VBCurtis     "Curtis" Feb 2005 Riverside, CA 2×5×11×43 Posts To determine 23 is prime, try dividing by every prime below the square root of 23. 2 and 3 do not divide 23, so 23 is prime.
2018-09-17, 08:53   #3
sweety439

Nov 2016

B0416 Posts

Quote:
 Originally Posted by Tamay82 Hello Prime95 can you help me I want to find any prime number? What can I do if I want to find eg, 23 is a prime number ?
2^23==2 mod 23, thus 23 is prime.

2018-09-17, 12:10   #4
LaurV
Romulan Interpreter

Jun 2011
Thailand

936410 Posts

Quote:
 Originally Posted by sweety439 2^23==2 mod 23, thus 23 is prime.
2^341==2 mod 341, thus 341 is prime

2018-09-18, 10:40   #5
AndrewWalker

Mar 2015
Australia

2×41 Posts

Quote:
 Originally Posted by LaurV 2^341==2 mod 341, thus 341 is prime

Ha!

(19:57) gp > (341-1)!%341
%54 = 0

Andrew

When in doubt, use Wilson's Theorem

http://fredrikj.net/blog/2012/03/fac...lsons-theorem/

2018-09-21, 10:48   #6
LaurV
Romulan Interpreter

Jun 2011
Thailand

22×2,341 Posts

Quote:
 Originally Posted by AndrewWalker Ha!

You have however a mistake in the post: you must not say "Ha!", but ""

(and don't tell me you made 54 trials to get that right! )

Last fiddled with by LaurV on 2018-09-21 at 10:49

 2018-09-24, 12:16 #7 AndrewWalker     Mar 2015 Australia 1228 Posts I'm not sure how to respond, but anyway! I used a few trials, but not that many! It was interesting exploring how far I could push this test, I got over 1000 but then needed to increase the stack limit in gp so gave up! Main point of my post was the link I shared. Frederik Johansson is the main aurthor of MPMath, Arb, and has made contributions to a number of other mathematical software projects. He made optimisations which let him test Wilson's Theorem up to 15 digits, that's crazy!! Andrew
 2018-09-26, 21:48 #8 ixfd64 Bemusing Prompter     "Danny" Dec 2002 California 23×33×11 Posts I'm not sure I this answers your question, but Prime95 can only test numbers of the form 2p - 1 for primality.

 Similar Threads Thread Thread Starter Forum Replies Last Post GP2 Hardware 52 2018-04-04 21:37 cipher Math 15 2009-06-08 05:19 jasong Math 5 2007-12-25 05:08 wblipp Software 1 2003-09-20 07:25 Deamiter Software 4 2002-10-11 16:36

All times are UTC. The time now is 10:30.

Sun Apr 11 10:30:44 UTC 2021 up 3 days, 5:11, 1 user, load averages: 2.30, 2.30, 2.19