OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..3790
EXAMPLE
a(3)=59 is in the sequence because 59 is prime and A338770(59) = 103 is prime.
MAPLE
filter:= proc(p) local q, v, t;
t:= 0; q:= 1;
do
q:= nextprime(q);
if 2*q > p then return isprime(t) fi;
v:= p-2*q;
if isprime(v) then t:= t+v fi;
od
end proc:
select(filter, [seq(ithprime(i), i=1..2000)]);
PROG
(PARI) f(n) = my(s=0); forprime(p=0, n\2, if (isprime(q=n-2*p), s+=q)); s; \\ A338770
isok(p) = isprime(p) && isprime(f(p)); \\ Michel Marcus, Nov 08 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Nov 08 2020
STATUS
approved