Primality by Wilson's theorem: Difference between revisions
Content added Content deleted
No edit summary |
m (All new tasks start as drafts) |
||
Line 1: | Line 1: | ||
{{task|Prime Numbers}} |
{{Draft task|Prime Numbers}} |
||
;Task: |
;Task: |
Revision as of 04:54, 1 January 2020
Primality by Wilson's theorem is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.
- Task
Write a boolean function that tells whether a given integer is prime.
Remember that 1 and all non-positive numbers are not prime.
A number is prime if p divides (p - 1)! + 1
.