Re: [PrimeNumbers] strange news
- Alex Petty wrote:
> let me ask again.It depends what you mean by real. It works correctly and he may be the first
> is this a real discovery? i didn't follow the previous explanation.
to publish this particular formula, but useless prime formulas based on
Wilson's theorem are common.
The discoverer added mention of it to Wikipedia in June 2007.
I removed it with an edit summary pointing to Wikipedia policies and ending
"Looks trivial, useless, non-notable":
At the time I checked that the formula actually works.
It uses the well-known Wilson's theorem (apparently first discovered by the
Arabian mathematician Ibn al-Haytham around year 1000) to test whether 2m+1
is an odd prime. If it is then 2m+1 is produced, otherwise 2. Instead of
writing this as a simple if-then-else, it uses a complicated formula with
the floor function to avoid direct use of an if-then-else construct which is
sometimes not considered an allowed part of a "formula".
Jens Kruse Andersen