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.

A090537 Least n-digit prime using digit 3 once and rest all 1, or 0 if no such prime exists.

Original entry on oeis.org

3, 13, 113, 0, 11113, 113111, 0, 11111131, 111111113, 0, 11111111113, 111113111111, 0, 31111111111111, 0, 0, 11111111113111111, 111111111111111131, 0, 11111111111111111131, 131111111111111111111, 0, 11111111111111111311111
Offset: 1

Views

Author

Amarnath Murthy, Dec 08 2003

Keywords

Crossrefs

Without zeros, subsequence of A107689.

Programs

  • Python
    from sympy import isprime
    def agen():
      digits = 0
      while True:
        for i in range(digits+1):
          t = int("1"*(digits-i) + "3" + "1"*i)
          if isprime(t): yield t; break
        else: yield 0
        digits += 1
    g = agen()
    print([next(g) for i in range(23)]) # Michael S. Branicky, Mar 13 2021

Formula

a(3n+1) = 0.

Extensions

More terms from David Wasserman, Jan 03 2006