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.

A349636 Primes that remain prime when a single "1" digit is inserted between any two adjacent digits.

Original entry on oeis.org

13, 31, 37, 67, 79, 103, 109, 151, 163, 181, 193, 211, 241, 367, 457, 547, 571, 601, 613, 631, 709, 787, 811, 1117, 1213, 1831, 2017, 2683, 3019, 3319, 3391, 3511, 3517, 3607, 4519, 4999, 6007, 6121, 6151, 6379, 6673, 6871, 6991, 8293, 11119, 11317, 11467
Offset: 1

Views

Author

Michael S. Branicky, Nov 23 2021

Keywords

Examples

			37 and 317 are prime; 2683 is prime, as are 21683, 26183, and 26813.
		

Crossrefs

The terms of A069246 > 10 are a subsequence.
Cf. A215417 (same with 0), A217044 (2), A217045 (4), A217046 (6), A217047 (8), A217062 (9), A217063 (3), A217064 (5), A217065 (7).
Subsequence of A002476.

Programs

  • Mathematica
    Select[Prime@Range[5,1500],(p=#;And@@PrimeQ[FromDigits/@(Insert[IntegerDigits@p,1,#]&/@Range[2,IntegerLength@p])])&] (* Giorgos Kalogeropoulos, Nov 23 2021 *)
  • Python
    from sympy import isprime, primerange
    def ok(p):
        if p < 10: return False
        s = str(p)
        return all(isprime(int(s[:i] + "1" + s[i:])) for i in range(1, len(s)))
    def aupto(limit): return [p for p in primerange(1, limit+1) if ok(p)]
    print(aupto(12000)) # Michael S. Branicky, Nov 23 2021