A071406 a(n) is the smallest multiplier of n! such that -1+a(n)*n! and 1+a(n)*n! are both primes.
4, 2, 1, 3, 2, 17, 7, 6, 3, 14, 29, 30, 48, 27, 9, 24, 12, 97, 78, 47, 71, 80, 55, 13, 57, 20, 81, 259, 108, 163, 81, 118, 63, 215, 173, 513, 420, 561, 537, 1162, 158, 33, 122, 286, 459, 391, 305, 288, 114, 307, 15, 680, 355, 365, 338, 70, 23
Offset: 1
Keywords
Examples
n=7: a(7)=7, 7!=5040, 7.7!=35280 and {35279,35281} are primes.
Links
- Pierre CAMI, Table of n, a(n) for n = 1..300
Programs
-
Mathematica
Table[fl=1; Do[s=(j!)*k; If[PrimeQ[s-1]&&PrimeQ[s+1]&&Equal[fl, 1], Print[{j, k}]; fl=0], {k, 1, 2*j^2}], {j, 0, 100}] smnf[n_]:=Module[{k=1,f=n!},While[!PrimeQ[k*f+1]||!PrimeQ[k*f-1],k++]; k]; Array[smnf,60] (* Harvey P. Dale, May 24 2016 *)