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.

A354834 Numbers k such that 2*k can be written in at least one way as p+q with p, q, p+2*q and 2*q+p all prime.

This page as a plain text file.
%I A354834 #9 Jun 14 2022 15:30:08
%S A354834 4,5,6,8,9,10,12,15,18,21,25,27,28,30,33,35,36,38,39,42,45,48,50,51,
%T A354834 54,57,60,63,66,72,75,78,80,81,84,85,87,88,90,93,98,99,102,105,108,
%U A354834 111,113,114,115,117,120,123,126,129,132,135,138,140,141,144,147,150,153,155,156,159,162,165,168
%N A354834 Numbers k such that 2*k can be written in at least one way as p+q with p, q, p+2*q and 2*q+p all prime.
%C A354834 Numbers k such that A237885(k) > 0.
%C A354834 If k is not divisible by 3, then p or q must be 3.
%H A354834 Robert Israel, <a href="/A354834/b354834.txt">Table of n, a(n) for n = 1..10000</a>
%e A354834 a(3) = 6 is a term because 2*6 = 12 = 5+7 with 5, 7, 5+2*7 = 19 and 2*5+7 = 17 all prime.
%p A354834 N:= 1000: # for terms <= N
%p A354834 S:= {}:
%p A354834 P:= select(isprime, [seq(i,i=3..2*N,2)]):
%p A354834 nP:= nops(P):
%p A354834 for i from 1 to nP do
%p A354834   p:= P[i];
%p A354834   for j from i+1 to nP do
%p A354834     q:= P[j];
%p A354834     if p+q > 2*N then break fi;
%p A354834     r:= (p+q)/2;
%p A354834     if isprime(p+2*q) and isprime(2*p+q) then
%p A354834       S:= S union {r}
%p A354834     fi
%p A354834   od
%p A354834 od:
%p A354834 sort(convert(S,list));
%Y A354834 Cf. A237885.
%K A354834 nonn
%O A354834 1,1
%A A354834 _Robert Israel_, Jun 07 2022