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!)
A032682 Numbers k such that k surrounded by digit '1' is a prime. 14

%I #18 Apr 05 2020 13:33:34

%S 0,3,5,8,9,15,17,18,20,23,29,30,32,36,38,45,47,48,51,53,57,60,62,72,

%T 74,80,81,83,86,87,90,93,95,107,113,116,117,125,126,131,132,135,141,

%U 147,149,155,162,168,170,173,180,182,183,194,197,198,201,204,207,210

%N Numbers k such that k surrounded by digit '1' is a prime.

%H Daniel Starodubtsev, <a href="/A032682/b032682.txt">Table of n, a(n) for n = 1..10000</a>

%p t0:=[]; u0:=[]; for n from 1 to 100 do t1:=cat(1,n,1); t1:=convert(t1,decimal,10); if isprime(t1) then t0:=[op(t0),n]; u0:=[op(u0),t1]; fi; od: t0;

%t Select[Range[0,210],PrimeQ[FromDigits[Join[{1},IntegerDigits[#],{1}]]]&] (* _Jayanta Basu_, Jun 02 2013 *)

%o (Python)

%o from sympy import isprime

%o print([i for i in range(200) if isprime(int('1' + str(i) + '1'))]) # _Daniel Starodubtsev_, Apr 05 2020

%Y The primes are in A099677. Cf. A032686.

%K nonn,base

%O 1,2

%A _Patrick De Geest_, May 15 1998

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 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)