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.

A079637 Smallest prime p with audioactive "echo" of at least n, that is, the finite sequence p_0 = p, p_1 = LookAndSay(p_0), ..., p_n = LookAndSay(p_(n-1)) consists entirely of primes.

Original entry on oeis.org

2, 3, 7, 233, 233, 233, 19972667609, 75022592087629
Offset: 0

Views

Author

Joseph L. Pe, Jan 30 2003

Keywords

Comments

LookAndSay(n) denotes the description of the digits of n. For example, LookAndSay(111223) = 312213. 2. There is no prime < 10^5 with echo = 6.

Examples

			233 is the smallest prime p such that p_0 = 233, p_1 = LookAndSay(233) = 1223, p_2 = LookAndSay(1223) = 112213.
		

Crossrefs

Programs

  • Python
    from sympy import isprime, nextprime
    from itertools import groupby, islice
    def LS(n):
        return int(''.join(str(len(list(g)))+k for k, g in groupby(str(n))))
    def f(n): return -1 if not isprime(n) else 1 + f(LS(n))
    def agen(startn=0, startp=2):
        n, p = startn, startp
        while True:
            fp = f(p)
            while (fp >= n): n += 1; yield p
            p = nextprime(p)
    print(list(islice(agen(), 6))) # Michael S. Branicky, Jul 27 2022

Extensions

Corrected by Mark Hudson (mrmarkhudson(AT)hotmail.com), Feb 02 2003, who reports there are no more terms < 10^6.
a(6) (found by Walter Schneider) and a(7) from Giovanni Resta, May 09 2020