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.

A246401 Smallest prime number Q such that the sum prime(n)+prime(n+1)+Q is a prime number.

This page as a plain text file.
%I A246401 #19 Mar 14 2022 17:44:58
%S A246401 2,3,5,5,5,7,5,5,7,7,3,5,5,7,3,19,7,3,11,5,5,5,7,5,13,7,13,7,5,11,5,3,
%T A246401 5,5,7,3,11,7,7,7,7,7,5,7,5,11,5,7,5,5,7,7,7,13,3,31,7,23,5,5,11,7,13,
%U A246401 7,11,5,5,7,5,7,7,7,3,5,7,37,11,11,11,11,13
%N A246401 Smallest prime number Q such that the sum prime(n)+prime(n+1)+Q is a prime number.
%H A246401 Pierre CAMI, <a href="/A246401/b246401.txt">Table of n, a(n) for n = 1..10000</a>
%e A246401 2+3+2=7 is prime so a(1)=2.
%e A246401 3+5+3=11 is prime so a(2)=3.
%e A246401 5+7+3=15 is composite, and 5+7+5=17 is prime so a(3)=5.
%t A246401 spn[n_]:=Module[{p=2},While[!PrimeQ[n+p],p=NextPrime[p]];p]; spn/@ (Total/@ Partition[Prime[Range[100]],2,1]) (* _Harvey P. Dale_, Mar 14 2022 *)
%o A246401 (PFGW & SCRIPT)
%o A246401 SCRIPT
%o A246401 DIM k
%o A246401 DIM n,0
%o A246401 OPENFILEOUT myf,a(n).txt
%o A246401 LABEL loop1
%o A246401 SET n,n+1
%o A246401 IF n>10000 THEN END
%o A246401 SET k,0
%o A246401 LABEL loop2
%o A246401 SET k,k+1
%o A246401 PRP p(n)+p(n+1)+p(k)
%o A246401 IF ISPRP then GOTO a
%o A246401 GOTO loop2
%o A246401 LABEL a
%o A246401 WRITE myf,t
%o A246401 GOTO loop1
%o A246401 (PARI) a(n) = t=prime(n)+prime(n+1); k=1; while(!isprime(t+q=prime(k)), k++); q \\ _Colin Barker_, Aug 25 2014
%Y A246401 Cf. A246400.
%K A246401 nonn
%O A246401 1,1
%A A246401 _Pierre CAMI_, Aug 25 2014