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.

Showing 1-1 of 1 results.

A385144 a(n) is the smallest 2*n + 1 digit prime consisting of a string of 2*n - 1 identical digits d sandwiched between two same digits different from d, or -1 if no such prime exists.

Original entry on oeis.org

101, 13331, 1333331, 188888881, 74444444447, 1666666666661, 188888888888881, 16666666666666661, 1666666666666666661, 155555555555555555551, 75555555555555555555557, -1, -1, 72222222222222222222222222227, 3111111111111111111111111111113, 155555555555555555555555555555551
Offset: 1

Views

Author

Jean-Marc Rebert, Jun 19 2025

Keywords

Comments

If we replace 2*n - 1 with 2*n in the definition, all such numerical candidates become composite and divisible by 11.

Examples

			a(1) = 101, because it contains one 0 that is flanked by two 1s, which are different from 0, and no smaller prime has this property.
		

Crossrefs

Cf. A384979.

Programs

  • Python
    from sympy import isprime
    def a(n): return next((t for c in "123456789" for d in "0123456789" if c!=d and isprime(t:=int(c+d*(2*n-1)+c))), -1)
    print([a(n) for n in range(1, 17)]) # Michael S. Branicky, Jun 19 2025
Showing 1-1 of 1 results.