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

%I #8 Nov 22 2012 13:12:40

%S 3,5,7,13,113,3851,46093,10321937,185794579,

%T 216862434431944426122117120047,

%U 1874480713189654839282450157086195210900931486780353469173376681742503659434414632312033372643386765197475111737132341321962070865661132800000000000000000173

%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=4, 4!! + 4 + 1 = 4*2 + 4 + 1 = 8 + 4 + 1 = 13, 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(i+k+1) then print(i+k+1); fi; od: end: SFACT(550);

%t Select[Table[n!!+n+1,{n,250}],PrimeQ] (* _Harvey P. Dale_, Nov 22 2012 *)

%K nonn

%O 1,1

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