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.

A341017 Primes p such that placing digit i at both ends of p produces another prime for at least two of i = [1,3,7, 9].

Original entry on oeis.org

2, 5, 17, 23, 29, 31, 41, 43, 47, 53, 61, 67, 71, 73, 83, 101, 107, 113, 131, 149, 197, 239, 241, 257, 263, 269, 293, 317, 347, 359, 389, 401, 421, 431, 443, 503, 521, 557, 593, 599, 607, 641, 647, 677, 683, 701, 757, 797, 827, 887, 911, 953, 1031, 1103, 1109, 1117, 1171, 1181, 1187, 1223, 1277
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Feb 02 2021

Keywords

Comments

Numbers that are in at least two of A069687, A069688, A069689 and A069690.

Examples

			a(3) = 17 is a term because 17 is in A069687 and A069689, i.e. 1171 and 7177 are prime.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local i; isprime(n) and numboccur(true,[seq(isprime(i+10*n+i*10^(2+ilog10(n))),i=[1,3,7,9])]) >= 2 end proc:
    select(filter, [2,seq(i,i=3..1000)]);
  • Python
    from sympy import isprime, nextprime
    def ok(p): return sum(isprime(int(c+str(p)+c)) for c in "1379") >= 2
    def aupto(limit): # only test primes
      alst, p = [], 2
      while p <= limit:
        if ok(p): alst.append(p)
        p = nextprime(p)
      return alst
    print(aupto(1277)) #Michael S. Branicky, Feb 02 2021