login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A240133 Least number k such that n!/k + 1 and n!/k - 1 are twin primes. 1
1, 2, 2, 3, 12, 12, 48, 8, 5, 54, 44, 6, 24, 39, 6, 81, 20, 30, 19, 25, 380, 28, 264, 50, 52, 250, 35, 385, 20, 77, 182, 405, 77, 605, 143, 720, 144, 722, 96, 713, 46, 403, 98, 4508, 90, 77, 560, 806, 64, 665, 2376, 1785, 893, 1235, 4278, 159, 66, 1326, 1806, 429, 475 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,2
LINKS
EXAMPLE
6!/1-1 (719) and 6!/1+1 (721) are not both prime. 6!/2-1 (359) and 6!/2+1 (361) are not both prime. 6!/3-1 (239) and 6!/3+1 (241) are both prime. thus, a(6) = 3.
MATHEMATICA
lnk[n_]:=Module[{nf=n!, k=1}, While[!AllTrue[nf/k+{1, -1}, PrimeQ], k++]; k]; Array[lnk, 70, 3] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 18 2015 *)
PROG
(PARI) f(n)=for(k=1, n!, if(floor(n!/k-1)==n!/k-1 && floor(n!/k+1)==n!/k+1, if(ispseudoprime(n!/k-1) && ispseudoprime(n!/k+1), return(k))))
CROSSREFS
Sequence in context: A182779 A199673 A335942 * A293445 A126339 A268725
KEYWORD
nonn
AUTHOR
Derek Orr, Apr 02 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 14:50 EDT 2024. Contains 371792 sequences. (Running on oeis4.)