4 ms·
Is it true only for primes? Is there a case for which the rule holds but p isn't prime?
by divs1210 11y ago
Is it true only for primes? Is there a case for which the rule holds but p isn't prime?
- ColinWright 11y agoHave you actually tried it? There is code in the article - have you tried running it? If so, what have you tried, and what answers did you get? If not, why not?
- divs1210 11y agoI've tried it, and used it to test primality. Then I thought I might be biased. http://pizzaforthought.blogspot.in/2015/07/prime.html http://pizzaforthought.blogspot.in/2015/07/prime.html
- ColinWright 11y agoBeing true for primes does not mean that it's true only for primes. With regards composites the result (as it stands) says nothing, so for a given composite it might be true or false, and you'd need to test. That means that if a number fails this test then it's definitely not prime, but if it passes then it may or may not be prime. However, this link (as included in another comment) gives more information: https://en.wikipedia.org/wiki/Wolstenholme%27s_theorem#Generalizations https://en.wikipedia.org/wiki/Wolstenholme%27s_theorem#Gener...
- ColinWright 11y agoLooking carefully, you have this very, very wrong. You've said: Today I found something called Wolstenholme’s theorem, which says: A number n (> 3) is prime if the numerator of H(n-1) is a multiple of n², where H(n) = 1/1 + 1/2 + ... 1/n No, no, no, no, no ... The theorem says: For a prime p > 3, the numerator of H_{p-1} is divisible by p^2. You have your "if" condition the wrong way round. I've tried to comment on your blog, but it requires a login using any of several techniques, none of which I use, and none of which I'm willing to create just for this. So I didn't.
- divs1210 11y agoThank you for taking out the time. I've updated my post now.
- adam-f 11y ago"Leudesdorf has proved that for a positive integer n coprime to 6" https://en.wikipedia.org/wiki/Wolstenholme%27s_theorem#Generalizations https://en.wikipedia.org/wiki/Wolstenholme%27s_theorem#Gener...