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!)
A347864 Left- or right-truncatable primes, restricted to one consecutive zero. 1
2, 3, 5, 7, 13, 17, 23, 29, 31, 37, 43, 47, 53, 59, 67, 71, 73, 79, 83, 97, 103, 107, 113, 131, 137, 139, 167, 173, 179, 197, 223, 229, 233, 239, 271, 283, 293, 307, 311, 313, 317, 331, 337, 347, 353, 359, 367, 373, 379, 383, 397, 431, 433, 439, 443, 467, 479, 503 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
There are 16484138 primes in this list, in total. The largest one has 60 digits and there is only one of that length.
LINKS
PROG
(Python)
from sympy import isprime
route = set({})
nums = [i*(10**j) for i in range(1, 10) for j in range(2)]
def addnum(a):
global route
for j in nums:
b = int("{}{}".format(a, j))
if isprime(b):
if b not in route:
route.add(b)
addnum(b)
for j in nums:
b = int("{}{}".format(j, a))
if isprime(b):
if b not in route:
route.add(b)
addnum(b)
def run():
for i in nums:
if isprime(i):
addnum(i)
CROSSREFS
Left- or right-truncatable primes, excluding all 0s: A137812.
The number of primes of length n following these rules: A346662.
Sequence in context: A179336 A080608 A305352 * A137812 A216578 A094317
KEYWORD
nonn,fini
AUTHOR
Timothy Smith, Jan 25 2022
STATUS
approved

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