login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A006567 Emirps (primes whose reversal is a different prime).
(Formerly M4887)
143
13, 17, 31, 37, 71, 73, 79, 97, 107, 113, 149, 157, 167, 179, 199, 311, 337, 347, 359, 389, 701, 709, 733, 739, 743, 751, 761, 769, 907, 937, 941, 953, 967, 971, 983, 991, 1009, 1021, 1031, 1033, 1061, 1069, 1091, 1097, 1103, 1109, 1151, 1153, 1181, 1193 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

REFERENCES

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

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

LINKS

T. D. Noe, Table of n, a(n) for n = 1..10000

C. K. Caldwell, The Prime Glossary, emirp

Eric Weisstein's World of Mathematics, Emirp.

MAPLE

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:

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:

seq(A006567(n), n=1..120) ; # R. J. Mathar, May 24 2010

MATHEMATICA

f[n_] := ToExpression[StringReverse[ToString[n]]]; Select[ Range[ 1200 ], PrimeQ[ f[ # ] ] && PrimeQ[ # ] && f[ # ] != # & ] (* Santi Spadaro, Oct 14 2001 *)

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

PROG

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

(PARI) is(n)=my(r=eval(concat(Vecrev(Str(n))))); isprime(r)&&r!=n&&isprime(n) \\ Charles R Greathouse IV, Nov 20 2012

(Haskell)

a006567 n = a006567_list !! (n-1)

a006567_list = filter f a000040_list where

   f p = a010051' q == 1 && q /= p  where q = a004086 p

-- Reinhard Zumkeller, Jul 16 2014

(Python)

from sympy import prime, isprime

A006567 = [p for p in (prime(n) for n in xrange(1, 10**6)) if str(p) != str(p)[::-1] and isprime(int(str(p)[::-1]))] # Chai Wah Wu, Aug 14 2014

CROSSREFS

Cf. A003684, A007628 (subsequence), A046732, A048051, A048052, A048053, A048054, A048895.

A007500 = A002385 union this sequence.

Cf. A000040, A010051, A004086.

Sequence in context: A180526 A161401 A225035 * A246043 A246045 A108388

Adjacent sequences:  A006564 A006565 A006566 * A006568 A006569 A006570

KEYWORD

nonn,nice,easy,base

AUTHOR

N. J. A. Sloane.

EXTENSIONS

More terms from James A. Sellers, Jan 22 2000

STATUS

approved

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

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

Last modified November 28 02:24 EST 2014. Contains 250286 sequences.