OFFSET
1,1
EXAMPLE
For k=7, 7!!-1 = 105-1 = 104 and R(104) = 401 is prime.
MAPLE
P:=proc(i) local a, b, k, n, v; v:=array(1..10000); for n from 1 by 1 to i do a:=1; k:=doublefactorial(n)-1; while k>0 do v[a]:=k-(trunc(k/10)*10); k:=trunc(k/10); a:=a+1; od; k:=0; for b from a-1 by -1 to 1 do k:=k+v[b]*10^(a-1-b); od; if isprime(k) then print(k); fi; od; end: P(2000);
MATHEMATICA
Sort[Select[Table[FromDigits[Reverse[IntegerDigits[i!!-1]]], {i, 150}], PrimeQ]] (* Stefano Spezia, May 02 2024 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Mar 02 2010, Mar 05 2010
EXTENSIONS
Edited by Charles R Greathouse IV, Aug 02 2010
STATUS
approved