mersenneforum.org  

Go Back   mersenneforum.org > New To GIMPS? Start Here! > Information & Answers

Reply
 
Thread Tools
Old 2018-09-16, 18:07   #1
Tamay82
 
Aug 2018

5 Posts
Default 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 ?
Tamay82 is offline   Reply With Quote
Old 2018-09-16, 18:35   #2
VBCurtis
 
VBCurtis's Avatar
 
"Curtis"
Feb 2005
Riverside, CA

2×5×11×43 Posts
Default

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.
VBCurtis is offline   Reply With Quote
Old 2018-09-17, 08:53   #3
sweety439
 
Nov 2016

B0416 Posts
Default

Quote:
Originally Posted by Tamay82 View Post
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.
sweety439 is offline   Reply With Quote
Old 2018-09-17, 12:10   #4
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

936410 Posts
Default

Quote:
Originally Posted by sweety439 View Post
2^23==2 mod 23, thus 23 is prime.
2^341==2 mod 341, thus 341 is prime
LaurV is offline   Reply With Quote
Old 2018-09-18, 10:40   #5
AndrewWalker
 
AndrewWalker's Avatar
 
Mar 2015
Australia

2×41 Posts
Default

Quote:
Originally Posted by LaurV View Post
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/
AndrewWalker is offline   Reply With Quote
Old 2018-09-21, 10:48   #6
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

22×2,341 Posts
Default

Quote:
Originally Posted by AndrewWalker View Post
Ha!
haha, you made my day!

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
LaurV is offline   Reply With Quote
Old 2018-09-24, 12:16   #7
AndrewWalker
 
AndrewWalker's Avatar
 
Mar 2015
Australia

1228 Posts
Default

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
AndrewWalker is offline   Reply With Quote
Old 2018-09-26, 21:48   #8
ixfd64
Bemusing Prompter
 
ixfd64's Avatar
 
"Danny"
Dec 2002
California

23×33×11 Posts
Default

I'm not sure I this answers your question, but Prime95 can only test numbers of the form 2p - 1 for primality.
ixfd64 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Neural network prime finding GP2 Hardware 52 2018-04-04 21:37
A prime finding formula. what do you think? cipher Math 15 2009-06-08 05:19
Will prime finding become easier? jasong Math 5 2007-12-25 05:08
Make Prime95 continue after finding a factor? wblipp Software 1 2003-09-20 07:25
Probability of finding a prime number 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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.