OFFSET
1,1
COMMENTS
Primes for which permutations described in the name produce primes with leading 0s are in the sequence but the generated primes with leading 0s are not. For example, in 6709: permutations of odd digits produce 6907, permutations of even digits produce 769, and permutations of even digits and of odd digits produce 967. Hence 6709 and 6907 are in the sequence but 769 and 967 are not since they have leading 0s.
The primes in the sequence cannot contain 5.
No further terms up to 10^10. - Robert Israel, Sep 25 2024
EXAMPLE
1249 is in the sequence since the permutations described in the name produce 9241, 1429 and 9421, which are also prime.
MAPLE
filter:= proc(n) local L, Ev, Od, Le, Lo, i, x;
if not isprime(n) then return false fi;
L:= convert(n, base, 10);
Ev, Od:= selectremove(t -> L[t]::even, [$1..nops(L)]);
if nops(convert(L[Ev], set)) < 2 or nops(convert(L[Od], set)) < 2 then return false fi;
for Le in combinat:-permute(L[Ev]) do
for Lo in combinat:-permute(L[Od]) do
x:= add(Le[i]*10^(Ev[i]-1), i=1..nops(Ev)) + add(Lo[i]*10^(Od[i]-1), i=1..nops(Od));
if not isprime(x) then return false fi
od od;
true
end proc:
select(filter, [$1000 .. 10^5]); # Robert Israel, Sep 25 2024
CROSSREFS
KEYWORD
nonn,more,base
AUTHOR
Enrique Navarrete, Sep 25 2024
EXTENSIONS
a(21) to a(23) from Robert Israel, Sep 25 2024
STATUS
approved