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.
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
Examples
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.
Programs
-
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;
Comments