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”).

A376500
Primes that contain at least one even digit and two different odd digits where any permutation of the odd digits leaving the even digits fixed produces a prime.
4
107, 149, 167, 239, 293, 347, 389, 419, 491, 613, 619, 631, 691, 701, 709, 743, 761, 769, 907, 941, 967, 983, 1009, 1013, 1019, 1031, 1049, 1063, 1091, 1123, 1223, 1229, 1249, 1289, 1321, 1429, 1487, 1499, 1609, 1627, 1669, 1823, 1847, 2113, 2131, 2143, 2237, 2239, 2273, 2293, 2309, 2311, 2341
OFFSET
1,1
COMMENTS
The primes in the sequence cannot contain 5.
LINKS
EXAMPLE
1013 is a term since the permutations of the odd digits that leave the even digits fixed give 1031 and 3011, which are also prime.
MAPLE
filter:= proc(n) local L, oddi, eveni, xeven, i;
if not isprime(n) then return false fi;
L:= convert(n, base, 10);
if member(5, L) then return false fi;
oddi, eveni:= selectremove(t -> L[t]::odd, [$1..nops(L)]);
if nops(eveni) = 0 or nops(convert(L[oddi], set))<2 then return false fi;
xeven:= add(10^(i-1)*L[i], i=eveni);
andmap(t -> isprime(xeven+add(10^(oddi[i]-1)*L[t[i]], i=1..nops(oddi))), combinat:-permute(oddi))
end proc:
select(filter, [seq(i, i=3..10000, 2)]); # Robert Israel, Oct 23 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Enrique Navarrete, Sep 25 2024
STATUS
approved