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.

A246400 Smallest prime Q greater than prime(n+1) such that the sum prime(n)+prime(n+1)+Q is also prime, starting with n=2.

This page as a plain text file.
%I A246400 #20 Apr 08 2018 13:18:32
%S A246400 11,11,13,17,23,23,29,31,37,41,53,47,59,67,61,71,71,73,79,89,89,97,
%T A246400 107,109,107,127,131,127,139,139,151,157,151,157,179,167,173,181,211,
%U A246400 197,197,223,211,211,233,227,233,263,239,271,263,269,313,277,277,281,281
%N A246400 Smallest prime Q greater than prime(n+1) such that the sum prime(n)+prime(n+1)+Q is also prime, starting with n=2.
%C A246400 The sequence A152470 is a subsequence.
%H A246400 Pierre CAMI, <a href="/A246400/b246400.txt">Table of n, a(n) for n = 2..10001</a>
%e A246400 3+5+7=15 is composite and 3+5+11=19 is prime so a(2)=11.
%e A246400 5+7+11=23 is prime so a(3)=11.
%t A246400 spq[n_]:=Module[{m=NextPrime[n],q},q=NextPrime[m];While[!PrimeQ[ m+n+q], q=NextPrime[q]];q]; Table[spq[n],{n,Prime[Range[2,60]]}] (* _Harvey P. Dale_, Apr 08 2018 *)
%o A246400 (PFGW & SCRIPT)
%o A246400 SCRIPT
%o A246400 DIM k
%o A246400 DIM n,1
%o A246400 OPENFILEOUT myf,a(n).txt
%o A246400 LABEL loop1
%o A246400 SET n,n+1
%o A246400 IF n>10001 THEN END
%o A246400 SET k,n+1
%o A246400 LABEL loop2
%o A246400 SET k,k+1
%o A246400 PRP p(n)+p(n+1)+p(k)
%o A246400 IF ISPRP then GOTO a
%o A246400 GOTO loop2
%o A246400 LABEL a
%o A246400 WRITE myf,p(k)
%o A246400 GOTO loop1
%o A246400 (PARI) a(n) = t=prime(n)+prime(n+1); k=n+2; while(!isprime(t+q=prime(k)), k++); q \\ _Colin Barker_, Aug 25 2014
%Y A246400 Cf. A152470.
%K A246400 nonn
%O A246400 2,1
%A A246400 _Pierre CAMI_, Aug 25 2014