OFFSET
1,1
COMMENTS
The primes in the sequence cannot contain 5.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
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