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.
%I A237885 #18 Jun 08 2022 03:24:27 %S A237885 0,0,0,1,1,1,0,1,1,1,0,2,0,0,2,0,0,1,0,0,2,0,0,0,1,0,1,1,0,4,0,0,2,0, %T A237885 1,1,0,1,2,0,0,2,0,0,3,0,0,2,0,1,1,0,0,2,0,0,1,0,0,5,0,0,3,0,0,1,0,0, %U A237885 0,0,0,4,0,0,3,0,0,2,0,1,3,0,0,3,1,0,3 %N A237885 a(n) is the number of ways that 4n can be written as p+q (p>q) with p, q, (p-q)/2, 4n-(p-q)/2 all prime numbers. %C A237885 2n=q+(p-q)/2; 6n=p+(4n-(p-q)/2). %C A237885 Number of ways that 2*n can be written as a+b with a<b and a, b, a+2*b and 2*a+b all prime. - _Robert Israel_, Jun 07 2022 %H A237885 Lei Zhou, <a href="/A237885/b237885.txt">Table of n, a(n) for n = 1..10000</a> %e A237885 When n=4, 4n=16, 16=13+3, (13-3)/2=5, 16-5=11, all four numbers {3, 5, 11, 13} are prime numbers. There is no other such four number set with this property, so a(4)=1; %e A237885 When n=30, 4n=120. %e A237885 120=113+7, (113-7)/2=53, 120-53=67. Set 1: {7, 53, 67, 113}. %e A237885 120=109+11, (109-11)/2=49=7*7, X %e A237885 120=107+13, (107-13)/2=47, 120-47=73. Set 2: {13, 47, 73, 107}. %e A237885 120=103+17, (103-17)/2=43, 120-43=77=7*11, X %e A237885 120=101+19, (101-19)/2=41, 120-41=79. Set 3: {19, 41, 79, 101}. %e A237885 120=97+23, (97-23)/2=37, 120-37=83. Set 4: {23, 37, 83, 97}. %e A237885 120=89+31, (89-31)/2=29, 120-29=91=7*13, X %e A237885 120=83+37, same with Set 4. %e A237885 120=79+41, same with Set 3. %e A237885 120=73+47, same with Set 2. %e A237885 120=67+53, same with Set 1. %e A237885 120=61+59, (61-59)/2=1, X %e A237885 So four acceptable sets have been found, and therefore a(30)=4. %p A237885 N:= 100: # for a(1)..a(N) %p A237885 V:= Vector(N): %p A237885 P:= select(isprime, [seq(i,i=3..2*N,2)]): %p A237885 nP:= nops(P): %p A237885 for i from 1 to nP do %p A237885 p:= P[i]; %p A237885 for j from i+1 to nP do %p A237885 q:= P[j]; %p A237885 if p+q > 2*N then break fi; %p A237885 r:= (p+q)/2; %p A237885 if isprime(p+2*q) and isprime(2*p+q) then %p A237885 V[r]:= V[r]+1 %p A237885 fi %p A237885 od %p A237885 od: %p A237885 convert(V,list); # _Robert Israel_, Jun 08 2022 %t A237885 Table[qn = 4*n; p = 2*n - 1; ct = 0; While[p = NextPrime[p]; p < qn, q = qn - p; If[PrimeQ[q] && PrimeQ[(p - q)/2] && PrimeQ[qn - (p - q)/2], ct++]]; ct/2, {n, 1, 87}]4*n-1 %o A237885 (PARI) a(n)=my(s);forprime(p=2,n,if(isprime(2*n-p) && isprime(2*n+p) && isprime(4*n-p), s++)); s \\ _Charles R Greathouse IV_, Mar 15 2015 %Y A237885 Cf. A002375, A354834. %K A237885 nonn,easy %O A237885 1,12 %A A237885 _Lei Zhou_, Feb 14 2014