Double check - this is prime, yes?

  • Thread starter CRGreathouse
  • Start date
  • Tags
    Prime
In summary, the number 32986 is prime and it passed all of the tests that were used to determine this.
  • #1
CRGreathouse
Science Advisor
Homework Helper
2,845
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
  • #2
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:
  • #3
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:
  • #4
how much math should i have before i attempt to self-study number theory?
 
  • #5
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.
 
  • #6
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:
  • #7
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:

FAQ: Double check - this is prime, yes?

1. What does it mean to "double check" if a number is prime?

Double checking if a number is prime means to go through the process of determining if the number meets all the criteria for being considered a prime number. This includes checking if it is only divisible by 1 and itself, and if it is a positive integer.

2. Why is it important to double check if a number is prime?

Double checking if a number is prime is important because sometimes a number may appear to meet the criteria for being a prime number, but upon further examination it may not actually be a prime number. Double checking ensures accuracy in determining whether a number is truly prime.

3. What methods can be used to double check if a number is prime?

Some methods that can be used to double check if a number is prime include the trial division method, the Sieve of Eratosthenes, and Fermat's little theorem. These methods involve various mathematical calculations and can be done by hand or with computer algorithms.

4. How can I double check if a large number is prime?

Double checking if a large number is prime can be a time-consuming process, especially if done by hand. One way to do this is by using computer algorithms specifically designed for checking prime numbers. These algorithms can handle large numbers much more efficiently than manual calculations.

5. Are there any tools or resources available to help with double checking if a number is prime?

Yes, there are many tools and resources available to help with double checking if a number is prime. These include online prime number calculators, mathematical software programs, and even smartphone apps. These tools can save time and effort in the process of double checking if a number is prime.

Similar threads

Replies
4
Views
3K
Replies
2
Views
2K
Replies
4
Views
2K
Replies
5
Views
1K
Replies
1
Views
2K
Replies
7
Views
3K
Replies
5
Views
3K
Replies
8
Views
3K
Replies
2
Views
40K
Replies
4
Views
2K
Back
Top