Double check - this is prime, yes?

  • Context: Graduate 
  • Thread starter Thread starter CRGreathouse
  • Start date Start date
  • Tags Tags
    Prime
Click For Summary

Discussion Overview

The discussion revolves around the primality of a specific large number expressed as 32986!/(2*(16493!)^2)+1. Participants explore the methods used to test its primality, including various algorithms and tests, while considering the implications of the results.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant initially questions the primality of the number, suspecting it might be a pseudoprime due to previous tests indicating it was composite.
  • Another participant reports that Mathematica confirms the number is prime, noting it found no divisors other than 1 and itself.
  • A participant inquires about the specific tests used by Mathematica to determine primality, mentioning they conducted a Baillie-Pomerance-Selfridge-Wagstaff (BPSW) test and multiple Rabin-Miller tests.
  • Some participants discuss the limitations of the PrimeQ function in Mathematica, referencing its testing methodology and the potential for error with large numbers.
  • There is a suggestion that while the number appears to be very likely prime, proving its primality definitively may be impractical due to its size.

Areas of Agreement / Disagreement

Participants express differing views on the reliability of the primality tests and the implications of the results, indicating that there is no consensus on the definitive status of the number as prime or composite.

Contextual Notes

Participants note that the testing methods have limitations, particularly for numbers larger than 10^16, which could lead to misclassification of composite numbers as prime.

CRGreathouse
Science Advisor
Homework Helper
Messages
2,832
Reaction score
0
Double check -- this is prime, yes?

I thought I had uncovered some kind of pseudoprime, since I found this number with pfgw and on checking it, found it to be composite. I tested it for pseudoprimality with a battery of tests, though, and it passed all of them -- leading me to think that I was mistaken in the first place and tested some other number by typo. But on the off chance it is a pseudoprime I'd like to know, since it would be the only known Baillie-Pomerance-Selfridge-Wagstaff pseudoprime.

The 9928-digit number is:
32986!/(2*(16493!)^2)+1
 
Physics news on Phys.org
After about 4 minutes of thinking very hard, Mathematica confirms that
32986!/(2*(16493!)^2) + 1
is prime.

PS It found no divisors but 1 and itself. Which could be viewed as a confirmation of either the fact that it's prime, or that the PrimeQ[] function first finds the divisors and then checks how many there are :smile:
 
Last edited:
I don't imagine you know what kind of test it used to determine that? I've run a (B)PSW test (a 2-strong plus a (21, -1)-Lucas test in this case) and 10 strong (Rabin-Miller) tests with random bases. The latter has worst-case error of 2^-20.
 
Last edited:
how much math should i have before i attempt to self-study number theory?
 
rocophysics said:
how much math should i have before i attempt to self-study number theory?

It depends what kind. The most basic concepts form Elementary Number Theory and can even be learned while still in high school.
 
CRGreathouse said:
I don't imagine you know what kind of test it used to determine that?

The http://reference.wolfram.com/mathematica/note/SomeNotesOnInternalImplementation.html#6849 say that
  • PrimeQ first tests for divisibility using small primes, then uses the Miller-Rabin strong pseudoprime test base 2 and base 3, and then uses a Lucas test.
  • As of 1997, this procedure is known to be correct only for n<1016, and it is conceivable that for larger n it could claim a composite number to be prime.

I'm now re-running it using this package.
[update]The kernel crashed and I need it for something else now. It ran for over an hour though. [/update]
 
Last edited by a moderator:
CompuChip said:
The http://reference.wolfram.com/mathematica/note/SomeNotesOnInternalImplementation.html#6849 say that
  • PrimeQ first tests for divisibility using small primes, then uses the Miller-Rabin strong pseudoprime test base 2 and base 3, and then uses a Lucas test.
  • As of 1997, this procedure is known to be correct only for n<1016, and it is conceivable that for larger n it could claim a composite number to be prime.

I'm now re-running it using this package.
[update]The kernel crashed and I need it for something else now. It ran for over an hour though. [/update]

Thanks, that looks good.

I think the number is too long to reasonably prove prime, but it looks like we have shown it to be very likely to be a prime.
 
Last edited by a moderator:

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
40K