|
|
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.
|
|
1
|
|
|
|
OFFSET
|
0,1
|
|
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.
|
|
LINKS
|
|
|
EXAMPLE
|
233 is the smallest prime p such that p_0 = 233, p_1 = LookAndSay(233) = 1223, p_2 = LookAndSay(1223) = 112213.
|
|
PROG
|
(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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more
|
|
AUTHOR
|
|
|
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
|
|
STATUS
|
approved
|
|
|
|