cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A032682 #18 Apr 05 2020 13:33:34
%S A032682 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 A032682 74,80,81,83,86,87,90,93,95,107,113,116,117,125,126,131,132,135,141,
%U A032682 147,149,155,162,168,170,173,180,182,183,194,197,198,201,204,207,210
%N A032682 Numbers k such that k surrounded by digit '1' is a prime.
%H A032682 Daniel Starodubtsev, <a href="/A032682/b032682.txt">Table of n, a(n) for n = 1..10000</a>
%p A032682 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 A032682 Select[Range[0,210],PrimeQ[FromDigits[Join[{1},IntegerDigits[#],{1}]]]&] (* _Jayanta Basu_, Jun 02 2013 *)
%o A032682 (Python)
%o A032682 from sympy import isprime
%o A032682 print([i for i in range(200) if isprime(int('1' + str(i) + '1'))]) # _Daniel Starodubtsev_, Apr 05 2020
%Y A032682 The primes are in A099677. Cf. A032686.
%K A032682 nonn,base
%O A032682 1,2
%A A032682 _Patrick De Geest_, May 15 1998