login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Smallest k > 0 such that 240*k*p+1 , 6*k*p*(240*k*p+1)+1 , and 40*(6*k*p*(240*k*p+1)+1)+1 are prime or 0 if no solution, where p = prime(n).
1

%I #19 Aug 11 2014 22:45:49

%S 11,21,36,8,2,140,389,45,56,145,235,71,0,121,155,56,280,80,109,37,187,

%T 217,21,97,89,7,66,28,2,166,26,101,129,93,148,51,39,71,28,139,65,20,

%U 78,14,149,3,411,516

%N Smallest k > 0 such that 240*k*p+1 , 6*k*p*(240*k*p+1)+1 , and 40*(6*k*p*(240*k*p+1)+1)+1 are prime or 0 if no solution, where p = prime(n).

%C Let 240*k*p(n)+1 = prime R, 6*k*p(n)*R+1 = prime Q, and 40*Q+1 = prime P.

%C P=(240*k*p(n))^2+240*k*p(n)+41=x^2+x+41 with x=240*k*p(n)

%C As R and Q are provable primes so is P a provable prime of the Euler polynomial x^2+x+41.

%C The only 0 is for p(13)=41 as R is always composite except for k=0 then P and Q are unity.

%H Pierre CAMI, <a href="/A215968/b215968.txt">Table of n, a(n) for n = 1..3500</a>

%H David Broadhurst, <a href="http://listserv.nodak.edu/cgi-bin/wa.exe?A2=nmbrthry;8913b7f8.1208">A 132738-digit prime of the form x^2+x+41</a>, Aug 14 2012 (archive of the nmbrthry mailing list).

%e 240*11*2+1=5281 prime, 6*11*2*5281+1=697093 prime, (240*11*2)^2+(240*11*2)+41=27883721 prime. p(1)=2 so k(1)=11.

%t a[n_] := (Clear[k]; p = Prime[n]; R = 240*k*p + 1; Q = 6*k*p*R + 1; P = 40*Q + 1; If[FactorList[P][[1, 1]] > 1, Return[0], For[k = 1, True, k++, If[PrimeQ[P] && PrimeQ[Q] && PrimeQ[R], Return[k]]]]); Table[a[n], {n, 1, 50}] (* _Jean-François Alcover_, Sep 10 2012 *)

%o PFGW and SCRYPTIFY

%o SCRIPT

%o DIM nn

%o DIM kk

%o DIM rr

%o DIM qq

%o DIM pp

%o DIMS tt

%o OPENFILEOUT myf,a(n).txt

%o LABEL loopn

%o SET nn,nn+1

%o IF nn==13 THEN SET nn,14

%o IF nn>3500 THEN END

%o SET kk,0

%o LABEL loopk

%o SET kk,kk+1

%o SET rr,240*(kk*p(nn))+1

%o SETS tt,%d\,;kk

%o PRP rr,tt

%o IF ISPRP THEN GOTO a

%o GOTO loopk

%o LABEL a

%o SET qq,6*(kk*mm)*rr+1

%o PRP qq,tt

%o IF ISPRP THEN GOTO b

%o GOTO loopk

%o LABEL b

%o SET pp,40*qq+1

%o PRP pp,tt

%o IF ISPRP THEN GOTO c

%o GOTO loopk

%o LABEL c

%o WRITE myf,tt

%o GOTO loopn

%Y Cf. A215697.

%K nonn

%O 1,1

%A _Pierre CAMI_, Aug 29 2012