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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A069687 Primes that yield another prime on placing a 1 on both sides (as leading and trailing digits). 7
3, 5, 17, 23, 29, 47, 53, 83, 107, 113, 131, 149, 173, 197, 239, 251, 317, 359, 383, 401, 443, 503, 509, 599, 641, 683, 701, 719, 743, 797, 821, 947, 953, 1031, 1049, 1103, 1109, 1187, 1229, 1277, 1283, 1301, 1373, 1583, 1613, 1619, 1637, 1733, 1847, 1889 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Harvey P. Dale, Table of n, a(n) for n = 1..1000

EXAMPLE

239 belongs to this sequence as 12391 is also a prime.

947 and 19471 are both primes ==> 947 is in the sequence. [From José María Grau Ribas, Jan 22 2012]

MAPLE

a:= proc(n) option remember; local p;

      p:= `if`(n=1, 1, a(n-1));

      do p:= nextprime(p);

         if isprime(parse(cat(1, p, 1))) then break fi

      od; p

    end:

seq(a(n), n=1..100);  # Alois P. Heinz, May 18 2012

MATHEMATICA

Select[ Range[2000], PrimeQ[ # ] && PrimeQ[ FromDigits[ Insert[ IntegerDigits[ # ], 1, {{1}, {-1}}]]] &]

san[i_]:=1+Prime[i]*10+10^(Floor@Log[10, Prime[i]]+2); Prime@Select[Range[1000], PrimeQ@san[#]&]  (* From José María Grau Ribas, Jan 22 2012 *)

Select[Prime[Range[300]], PrimeQ[FromDigits[Join[{1}, IntegerDigits[#], {1}]]]&]  (* Harvey P. Dale, May 18 2012 *)

PROG

(PARI) forprime( p=1, 9999, isprime(10^#Str(p*10)+p*10+1) & print1(p", ")) \\ M. F. Hasler, May 18 2012

(PARI) A069687_vec(Nmax=10^4)=my(p, d=1); vector(Nmax, i, until(isprime((d+p)*10+1), d<(p=nextprime(p+1))&d*=10); p)  \\ M. F. Hasler, May 19 2012

CROSSREFS

Cf. A069688, A069689 & A069690.

Sequence in context: A152079 A027699 A153417 * A079017 A211440 A100564

Adjacent sequences:  A069684 A069685 A069686 * A069688 A069689 A069690

KEYWORD

nonn,base

AUTHOR

Amarnath Murthy, Apr 06 2002

EXTENSIONS

Edited and extended by Robert G. Wilson v, May 03 2002

Corrected and edited following suggestions by H. P. Dale and others by M. F. Hasler, May 18 2012

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified July 24 21:38 EDT 2017. Contains 289777 sequences.