login
Primes of the form n! + n!! + 1.
0

%I #15 Feb 13 2015 08:28:21

%S 3,5,769,1405006117752879898543142713389983127221179514880001

%N Primes of the form n! + n!! + 1.

%D G. Balzarotti and P. P. Lava, Le sequenze di numeri interi, Hoepli, 2008, p. 159.

%e For n=2, 2! + 2!! + 1 = 2 + 2 + 1 = 5, which is prime.

%e For n=6, 6! + 6!! + 1 = 720 + 48 + 1 = 769, which is prime.

%p SFACT:= proc(n) local i, j, k; for k from 1 by 1 to n do i:=k; j:=k-2; while j >0 do i:=i*j; j:=j-2; od: if isprime(k!+i+1) then print(k!+i+1); fi; od: end: SFACT(300);

%o (PARI) dfac(n)=prod(k=0,n\2-1,n-k-k)

%o for(n=1, 42, if(ispseudoprime(t=n!+dfac(n)+1), print1(t", "))); v \\ _Charles R Greathouse IV_, Feb 17 2011

%Y Cf. A118769.

%K nonn

%O 1,1

%A _Paolo P. Lava_ and _Giorgio Balzarotti_, May 25 2006

%E No more terms with fewer than a thousand digits. - _Charles R Greathouse IV_, Feb 17 2011