login
A371354
Primes p such that p, q and p + q but not q - p have distinct digits, where q is the next prime after p.
0
21067, 46279, 46831, 47659, 62017, 124853, 241567, 347629, 410257, 428093, 456901, 476059, 528719, 638179, 685471, 789631, 869521, 1024357, 2014357, 2146853, 2354167, 3268549, 3407659, 3682457, 3825649, 4021357, 4026571, 4180679, 4213567, 4562791, 7685401, 8602417, 20418637, 41870293, 76820453, 390465721
OFFSET
1,1
COMMENTS
Primes p = prime(k) such that p, prime(k+1) and p + prime(k+1) are in A010784 but p is not in A356196 (as prime(k+1) - p is not in A010784).
EXAMPLE
a(3) = 46831 is a term because it is prime, the next prime is 46853, and 46831, 46853 and 46831 + 46853 = 93684 have distinct digits but 46853 - 46831 = 22 does not.
MAPLE
isdd:= proc(n) local L;
L:= convert(n, base, 10);
nops(L) = nops(convert(L, set))
end proc:
Res:= NULL:
for d from 1 to 9 do
for t in combinat:-permute([$0..9], d) do
if t[1] = 0 then next fi;
p:= add(t[i]*10^(d-i), i=1..d);
if isprime(p) then
q:= nextprime(p);
if not(isdd(q-p)) and isdd(q) and isdd(p+q) then
Res:= Res, p;
fi
fi
od od:
Res;
CROSSREFS
Sequence in context: A181260 A316482 A340897 * A228299 A178279 A097239
KEYWORD
nonn,fini,full,base
AUTHOR
Zak Seidov and Robert Israel, Mar 19 2024
STATUS
approved