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.

A215968 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).

This page as a plain text file.
%I A215968 #19 Aug 11 2014 22:45:49
%S A215968 11,21,36,8,2,140,389,45,56,145,235,71,0,121,155,56,280,80,109,37,187,
%T A215968 217,21,97,89,7,66,28,2,166,26,101,129,93,148,51,39,71,28,139,65,20,
%U A215968 78,14,149,3,411,516
%N A215968 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 A215968 Let 240*k*p(n)+1 = prime R, 6*k*p(n)*R+1 = prime Q, and 40*Q+1 = prime P.
%C A215968 P=(240*k*p(n))^2+240*k*p(n)+41=x^2+x+41 with x=240*k*p(n)
%C A215968 As R and Q are provable primes so is P a provable prime of the Euler polynomial x^2+x+41.
%C A215968 The only 0 is for p(13)=41 as R is always composite except for k=0 then P and Q are unity.
%H A215968 Pierre CAMI, <a href="/A215968/b215968.txt">Table of n, a(n) for n = 1..3500</a>
%H A215968 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 A215968 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 A215968 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 A215968 PFGW and SCRYPTIFY
%o A215968 SCRIPT
%o A215968 DIM nn
%o A215968 DIM kk
%o A215968 DIM rr
%o A215968 DIM qq
%o A215968 DIM pp
%o A215968 DIMS tt
%o A215968 OPENFILEOUT myf,a(n).txt
%o A215968 LABEL loopn
%o A215968 SET nn,nn+1
%o A215968 IF nn==13 THEN SET nn,14
%o A215968 IF nn>3500 THEN END
%o A215968 SET kk,0
%o A215968 LABEL loopk
%o A215968 SET kk,kk+1
%o A215968 SET rr,240*(kk*p(nn))+1
%o A215968 SETS tt,%d\,;kk
%o A215968 PRP rr,tt
%o A215968 IF ISPRP THEN GOTO a
%o A215968 GOTO loopk
%o A215968 LABEL a
%o A215968 SET qq,6*(kk*mm)*rr+1
%o A215968 PRP qq,tt
%o A215968 IF ISPRP THEN GOTO b
%o A215968 GOTO loopk
%o A215968 LABEL b
%o A215968 SET pp,40*qq+1
%o A215968 PRP pp,tt
%o A215968 IF ISPRP THEN GOTO c
%o A215968 GOTO loopk
%o A215968 LABEL c
%o A215968 WRITE myf,tt
%o A215968 GOTO loopn
%Y A215968 Cf. A215697.
%K A215968 nonn
%O A215968 1,1
%A A215968 _Pierre CAMI_, Aug 29 2012