OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Index to Primes, Primes that become a different prime under some mapping.
MAPLE
filter:= proc(n) local L, Lp, i;
if not isprime(n) then return false fi;
L:= convert(n, base, 10);
Lp:= subs({4=8, 8=4}, L);
if L = Lp then return false fi;
isprime(add(Lp[i]*10^(i-1), i=1..nops(L)));
end proc:
select(filter, [seq(i, i=3..10000, 2)]); # Robert Israel, Nov 27 2019
MATHEMATICA
fQ[n_] := Block[{id = IntegerDigits@n}, (MemberQ[id, 4] || MemberQ[id, 8]) && PrimeQ[ FromDigits[ id /. {4 -> 8, 8 -> 4}] ]]; Select[ Prime@ Range@ 490, fQ]
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Zak Seidov and Robert G. Wilson v, Sep 09 2010
STATUS
approved