A090975 Least integer k such that n!+1-k is prime.
0, 0, 0, 0, 2, 8, 2, 2, 32, 14, 12, 0, 2, 24, 2, 48, 54, 60, 42, 102, 32, 32, 74, 90, 74, 150, 38, 0, 102, 32, 2, 62, 2, 2, 194, 114, 128, 0, 2, 74, 84, 0, 80, 110, 110, 54, 90, 80, 104, 60, 98, 180, 68, 60, 128, 62, 462, 278, 110, 138, 140, 72, 72, 102, 360, 128, 318, 192
Offset: 0
Keywords
Examples
a(3)=0 because 3!+1-0=7 is prime. a(4)=2 because 4!+1-2=23 is prime and 24 and 25 are not.
Programs
-
Maple
a := proc(n) option remember;n!+1-prevprime(n!+2); end;
Comments