login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A175789 Primes that become another prime under the map 8 <-> 9 (acting on the decimal digits). 49
181, 191, 283, 293, 787, 797, 811, 853, 877, 881, 887, 911, 953, 977, 991, 997, 1087, 1097, 1483, 1493, 1801, 1831, 1873, 1901, 1931, 1973, 2287, 2297, 2383, 2393, 2683, 2693, 2803, 2857, 2903, 2957, 3181, 3191, 3583, 3593, 3823, 3847, 3923, 3947, 4483 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
283 is in the sequence because changing the 8 to a 9 it becomes 293, a different prime. Likewise 293 is also in the sequence.
383 is not in the sequence because changing the 8 to a 9 it becomes 393, which is thrice 131.
MAPLE
N:= 1000000: # to get all entries <= N
F:= proc(n) local L, R, i;
if not isprime(n) then return false end if;
L:= convert(n, base, 10);
R:= subs([8=9, 9=8], L);
if R = L then return false end if;
isprime(add(R[i]*10^(i-1), i=1..nops(R)))
end proc:
select(F, [seq(2*i+1, i=1..floor((N-1)/2))]);
# Robert Israel, Feb 11 2013
MATHEMATICA
Reap[Do[p = Prime[n]; id = IntegerDigits[p]; id2 = id /. {9 -> 8, 8 -> 9}; If[PrimeQ[fd = FromDigits[id2]]&& fd != p, Sow[p]], {n, 2000}]][[2, 1]]; (* Seidov, corrected by Wouter Meeussen, Feb 10 2013 *)
fQ[n_] := Block[{id = IntegerDigits@n}, (MemberQ[id, 8] || MemberQ[id, 9]) && PrimeQ[ FromDigits[id /. {8 -> 9, 9 -> 8}] ]]; Select[ Prime@ Range@ 609, fQ] (* Robert G. Wilson v, Sep 06 2010 *)
PROG
(PARI) is_A175789(n)={my(d=digits(n)); d != (d=apply(t->bitxor(t, t>7), d)) & isprime( sum(i=1, #d, d[i]*10^(#d-i))) & isprime(n)} \\ - M. F. Hasler, Feb 11 2013
CROSSREFS
Cf. A171057.
Sequence in context: A253432 A218977 A253439 * A157747 A253156 A139649
KEYWORD
base,nonn
AUTHOR
Zak Seidov, Sep 05 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 06:14 EDT 2024. Contains 371964 sequences. (Running on oeis4.)