Well the simplest math expression to test if n is prime I’d guess is that n is prime if (gamma(n)^2)%n is not zero ;) I tested this using the mathematically simpler and smaller (but somewhat slower?) ((n-1)!*p!)%n where p! is the product of the primes less than n and with the exact equivalent to the gamma version ((n-1)!^2)%n. Not much use for huge primes without an incredibly fast and incredibly accurate method of evaluating the gamma function.
Sent: Monday, December 31, 2018 at 5:07 PM From: "Simon Plouffe" <simon.plouffe@gmail.com> To: math-fun <math-fun@mailman.xmission.com> Subject: [math-fun] formulas for producing primes <snip> The next good question is : can we make simpler , smaller ? I do not know.
Best regards, ps : Happy new year 2019 = not a prime. _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun