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.

A066811 Numbers k such that the concatenation of odd numbers from 1 to k is a prime.

Original entry on oeis.org

3, 19, 31, 67, 97, 5139
Offset: 1

Views

Author

Patrick De Geest, Jan 20 2002

Keywords

Comments

a(7) > 50000. - Michael S. Branicky, Aug 28 2025

Examples

			19 is a term because 135791113151719 is a prime.
		

Crossrefs

Programs

  • Mathematica
    p = ""; Do[p = p <> ToString[2*n+1]; If[PrimeQ[ToExpression[p]], Print[2*n+1]], {n, 0, 2569}] (* Ryan Propper, Aug 26 2005 *)
  • Python
    from sympy import isprime
    def agen():
      k, str1tok = 1, '1'
      while True:
        if isprime(int(str1tok)): yield k
        k, str1tok = k + 2, str1tok + str(k + 2)
    g = agen()
    print([next(g) for i in range(5)]) # Michael S. Branicky, Mar 19 2021

Formula

a(n) = 2*A046036(n) - 1. - Michel Marcus, Jan 31 2014

Extensions

a(6) from Ryan Propper, Aug 26 2005