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”).
%I #9 Nov 29 2019 01:38:14
%S 43,83,241,281,349,389,409,421,439,443,457,463,547,587,643,683,809,
%T 821,839,857,863,883,1249,1289,1423,1471,1487,1543,1583,1747,1787,
%U 1823,1847,1871,2341,2381,2437,2447,2647,2687,2749,2789,2837,2887,3049,3089,3433
%N Primes that become a different prime under the mapping 4 <=> 8.
%H Robert Israel, <a href="/A180549/b180549.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Pri#primes">Index to Primes</a>, Primes that become a different prime under some mapping.
%p filter:= proc(n) local L,Lp,i;
%p if not isprime(n) then return false fi;
%p L:= convert(n,base,10);
%p Lp:= subs({4=8,8=4},L);
%p if L = Lp then return false fi;
%p isprime(add(Lp[i]*10^(i-1),i=1..nops(L)));
%p end proc:
%p select(filter, [seq(i,i=3..10000,2)]); # _Robert Israel_, Nov 27 2019
%t fQ[n_] := Block[{id = IntegerDigits@n}, (MemberQ[id, 4] || MemberQ[id, 8]) && PrimeQ[ FromDigits[ id /. {4 -> 8, 8 -> 4}] ]]; Select[ Prime@ Range@ 490, fQ]
%Y Cf. A171045, A175791, A180517 thru A180559, A175789, A180560, A180561.
%K base,nonn
%O 1,1
%A _Zak Seidov_ and _Robert G. Wilson v_, Sep 09 2010