login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A069706 Primes with property that swapping first and last digits also gives a prime. 5
2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, 97, 101, 107, 113, 131, 149, 151, 157, 167, 179, 181, 191, 199, 311, 313, 337, 347, 353, 359, 373, 383, 389, 701, 709, 727, 733, 739, 743, 751, 757, 761, 769, 787, 797, 907, 919, 929, 937, 941, 953, 967, 971, 983, 991, 1009, 1013 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

This is not the same as A007500, "palindromic" primes.

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..10000

EXAMPLE

1049 and 9041 both are primes hence both are members.

MAPLE

swapdigs:= proc(n) local d;

  d:= ilog10(n);

  n + ((n mod 10)-floor(n/10^d))*(10^d-1);

end proc:

select(isprime and isprime @ swapdigs, [2, seq(2*i+1, i=1..10^4)]); # Robert Israel, Nov 11 2015

MATHEMATICA

Do[t = IntegerDigits[ Prime[n]]; u = t; u[[1]] = t[[ -1]]; u[[ -1]] = t[[1]]; t = FromDigits[u]; If[ PrimeQ[t], Print[ Prime[n]]], {n, 1, 300}]

PROG

(Python)

from sympy import prime, isprime

A069706_list = [2, 3, 5, 7]

for i in range(5, 10**6):

    p = prime(i)

    s = str(p)

    if isprime(int(s[-1]+s[1:-1]+s[0])):

        A069706_list.append(p) # Chai Wah Wu, Nov 11 2015

CROSSREFS

Cf. A007500, A069707, A069708.

Sequence in context: A211655 A055387 A061461 * A007500 A090933 A107845

Adjacent sequences:  A069703 A069704 A069705 * A069707 A069708 A069709

KEYWORD

nonn,base

AUTHOR

Amarnath Murthy, Apr 08 2002

EXTENSIONS

Edited and extended by Robert G. Wilson v, Apr 12 2002

Edited by N. J. A. Sloane, Jan 20 2009

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 24 04:36 EST 2020. Contains 332197 sequences. (Running on oeis4.)