Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 456 Bytes

wilson_primes.md

File metadata and controls

21 lines (14 loc) · 456 Bytes

Description

Wilson primes satisfy the following condition. Let P represent a prime number.

Then,

((P-1)! + 1) / (P * P)

should give a whole number.

Your task is to create a function that returns true if the given number is a Wilson prime.

My Solution

def am_I_Wilson(p)
  [5,13,563].include? p
end