login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A338771
Primes p such that A338770(p) is prime.
1
7, 41, 59, 61, 89, 167, 193, 251, 257, 283, 367, 401, 479, 523, 599, 601, 641, 743, 761, 811, 983, 997, 1087, 1109, 1117, 1201, 1277, 1361, 1429, 1483, 1619, 1741, 1789, 1861, 1889, 1901, 1931, 2237, 2297, 2417, 2609, 2843, 2897, 2939, 2971, 3023, 3121, 3167, 3373, 3413, 3457, 3533, 3719, 3767
OFFSET
1,1
LINKS
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
Cf. A338770.
Sequence in context: A224718 A374234 A272387 * A161505 A105902 A031909
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Nov 08 2020
STATUS
approved