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!)
A032685 Numbers k such that k surrounded by digit '9' is a prime. 8

%I #14 Sep 05 2022 02:05:42

%S 1,2,10,19,20,23,31,34,41,43,47,53,61,62,64,67,68,71,73,74,76,82,83,

%T 85,92,94,100,101,107,109,112,113,115,119,122,124,130,136,145,149,152,

%U 163,190,193,196,200,211,217,218,221,226,236,239,241,245

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

%H Harvey P. Dale, <a href="/A032685/b032685.txt">Table of n, a(n) for n = 1..1000</a>

%t Select[Range[300],PrimeQ[FromDigits[Join[{9},IntegerDigits[#],{9}]]]&] (* _Harvey P. Dale_, Jul 20 2012 *)

%o (Python)

%o from sympy import isprime

%o def ok(n): return isprime(int('9' + str(n) + '9'))

%o print([k for k in range(250) if ok(k)]) # _Michael S. Branicky_, Sep 04 2022

%Y Cf. A032682, A032683, A032684, A032690.

%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 19 17:39 EDT 2024. Contains 371797 sequences. (Running on oeis4.)