This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A006567 Emirps (primes whose reversal is a different prime). (Formerly M4887) 136

%I M4887

%S 13,17,31,37,71,73,79,97,107,113,149,157,167,179,199,311,337,347,359,

%T 389,701,709,733,739,743,751,761,769,907,937,941,953,967,971,983,991,

%U 1009,1021,1031,1033,1061,1069,1091,1097,1103,1109,1151,1153,1181,1193

%N Emirps (primes whose reversal is a different prime).

%D M. Gardner, The Magic Numbers of Dr Matrix. Prometheus, Buffalo, NY, 1985, p. 230.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H T. D. Noe, <a href="/A006567/b006567.txt">Table of n, a(n) for n = 1..10000</a>

%H C. K. Caldwell, The Prime Glossary, <a href="http://primes.utm.edu/glossary/page.php?sort=emirp">emirp</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Emirp.html">Emirp.</a>

%p # Contribution from _R. J. Mathar_, May 24 2010: (Start)

%p read("transforms") ; isA006567 := proc(n) local R ; if isprime(n) then R := digrev(n) ; isprime(R) and R <> n ; else false; end if; end proc:

%p A006567 := proc(n) option remember ; local a; if n = 1 then 13; else a := nextprime(procname(n-1)) ; while not isA006567(a) do a := nextprime(a) ; end do; return a; end if; end proc:

%p seq(A006567(n),n=1..120) ; # (End)

%t f[n_] := ToExpression[StringReverse[ToString[n]]]; Select[ Range[ 1200 ], PrimeQ[ f[ # ] ] && PrimeQ[ # ] && f[ # ] != # & ] (* from Santi Spadaro (spados(AT)katamail.com), Oct 14 2001 *)

%t ndig[ a_, b_ ] := 10a + b tonum[ dig_ ] := Fold[ ndig, 0, dig ] f[ n_ ] := tonum[ Reverse[ IntegerDigits[ n ] ] ] Select[ Range[ 1200 ], PrimeQ[ f[ # ] ] && PrimeQ[ # ] && f[ # ] =!= # & ] (* from Santi Spadaro (spados(AT)katamail.com), Oct 14 2001 *)

%o (MAGMA) [ n : n in [1..1194] | n ne rev and IsPrime(n) and IsPrime(rev) where rev is Seqint(Reverse(Intseq(n))) ]; // from Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006

%o (PARI) is(n)=my(r=eval(concat(Vecrev(Str(n)))));isprime(r)&&r!=n&&isprime(n) \\ _Charles R Greathouse IV_, Nov 20 2012

%Y Cf. A003684, A007628, A046732, A048051, A048052, A048053, A048054, A048895.

%Y A007500 = A002385 union this sequence.

%K nonn,nice,easy,base

%O 1,1

%A _N. J. A. Sloane_.

%E More terms from _James A. Sellers_, Jan 22 2000

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified June 19 13:12 EDT 2013. Contains 226406 sequences.