math, primes : Wilson theorem
Posted: Sat Oct 01, 2022 7:12 pm
Code to understand this crazy rule :
Code: Select all
Dim s.s(1)
s(0) = " = 0 so it's a prime"
fact + 1
Debug Chr($8000)
For n = 2 To 21
Debug Rset(Str(fact + 1), 24, " ") + "+1 % " + Str(n) + s(Bool((fact + 1) % n) )
fact * n
Next