cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A240133 Least number k such that n!/k + 1 and n!/k - 1 are twin primes.

This page as a plain text file.
%I A240133 #11 May 18 2015 16:21:29
%S A240133 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,
%T A240133 250,35,385,20,77,182,405,77,605,143,720,144,722,96,713,46,403,98,
%U A240133 4508,90,77,560,806,64,665,2376,1785,893,1235,4278,159,66,1326,1806,429,475
%N A240133 Least number k such that n!/k + 1 and n!/k - 1 are twin primes.
%H A240133 Giovanni Resta, <a href="/A240133/b240133.txt">Table of n, a(n) for n = 3..350</a>
%e A240133 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.
%t A240133 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 *)
%o A240133 (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))))
%Y A240133 Cf. A212281, A212282.
%K A240133 nonn
%O A240133 3,2
%A A240133 _Derek Orr_, Apr 02 2014