meditationatae

Just another WordPress.com site

Variation on factorial primes

Factorial primes are those of the form n! +/- 1.  When n is large enough, n!+/-1 will not be divible by the primes less than n: 2, 3, 5, ..  last prime less than `n’.

Are they “random primes”?  I would’n say that.  But while special primality tests exist for Mersenne numbers, I don’t know of any special method for factorial primes.

The variation, in its simplest form, consists in looking for primes of the form  n!/2 -1 .

 

Using PARI-gp, I did pseudo-prime tests (probabilistic tests), with a PARI/gp set-up using a defined function.

It’s organized to check for `n’ up to 10,000.

So far, the output is:

? for(W=3,10000,if(gre(W), print(W)))
3
4
5
6
9
31
41
373
589
812
989
1115
1488
1864
1918
4412
4686
5821

Explanation: `6′ is listed because for n = 6,

n!/2 -1 = 720/2 -1 = 359. 359 is indeed prime.

(43*1451*1559*12505833377 + 1)*2 = 20! .

In other words, for n = 20, n!/2 – 1 is a composite number.

n = 31, using PARI/gp ‘s `factor’ function:

? factor(floor(factorial(31)+0.1)/2 – 1)
%19 =
[4111419327088961408862781439999999 1]

So PARI/gp says that for n = 31, n!/2 – 1 is prime.

 

Advertisements

Written by meditationatae

November 17, 2012 at 6:38 pm

Posted in History

%d bloggers like this: