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.
2, 3, 7, 233, 233, 233, 19972667609, 75022592087629
Offset: 0
Examples
233 is the smallest prime p such that p_0 = 233, p_1 = LookAndSay(233) = 1223, p_2 = LookAndSay(1223) = 112213.
Links
- Carlos Rivera, Puzzle 36. Sequences of "descriptive primes", The Prime Puzzles and Problems Connection.
- Carlos Rivera, Puzzle 999. In Memoriam to John Horton Conway, The Prime Puzzles and Problems Connection.
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
Comments