Group Abstract Group Abstract

Message Boards Message Boards

1
|
5.5K Views
|
5 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Why Divisors[ ] is far faster than Factorinteger[ ]?

Hi there, anyone can tell me what are the codes behind the command "Divisors", how it is intrinsically done? I mean what is the algorithm behind it? does it use a command solve for the different modulus that equals zero as the remainder? Why is it not used to give a PrimeQ statement if it is so fast? I mean if there is only one divisor other than the number that is being divided itself isn't a prime? I am just curious about the logics behind this intriguing command...thank you anyway.

5 Replies

I am working with prime numbers I found a way for really huge numbers far faster than prime q, and I have checked against prime Q, it gives a right answer for seven out of 8 ... I am improving it ...just tried divisors and it works for numbers with 77 digits really fast I just wondered why divisors can not be improved so I wanted to know how it works in the core...thank you.

POSTED BY: Sander Huisman

Thank you so much Mr. Sander I will check it!!!

What makes you think that Divisors is faster than PrimeQ?

Perhaps it is faster for small number (103 or so).

But for large numbers PrimeQ is quite a bit faster than divisors (e.g. PrimeQ[418763839831824213]).

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard