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, a transposition in 401 produces 041, hence 401 is in the sequence but 41 is not.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
2027, 2207 are primes and 227 is prime with a leading 0 generated by permuting even digits in either 2027 or 2207. Hence 2027 and 2207 are in the sequence but 227 is not due to the leading 0.
6067, 6607 are primes but 667 generated by permuting even digits in either 6067 or 6607 is not prime, hence by name, neither number is in the sequence.
MAPLE
filter:= proc(n) local L, oddi, eveni, xodd, i;
if not isprime(n) then return false fi;
L:= convert(n, base, 10);
oddi, eveni:= selectremove(t -> L[t]::odd, [$1..nops(L)]);
if nops(convert(L[eveni], set))<2 then return false fi;
xodd:= add(10^(i-1)*L[i], i=oddi);
andmap(t -> isprime(xodd+add(10^(eveni[i]-1)*L[t[i]], i=1..nops(eveni))), combinat:-permute(eveni))
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