OFFSET
1,2
COMMENTS
Inspired by A326344.
The sequence is not periodic but bounded: a(n) <= 994 = a(1658) = a(2112) = a(2412) = a(3110) = ... .
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
Alois P. Heinz, Plot of the first 10^6 terms
MAPLE
c:= n-> (k-> `if`(isprime(k), c(k), k))(n+1):
a:= proc(n) option remember; `if`(n=1, 1,
(s-> parse(cat(s[-i]$i=1..length(s))))(""||(
`if`(isprime(n), c(a(n-1)), nextprime(a(n-1))))))
end:
seq(a(n), n=1..100);
CROSSREFS
KEYWORD
AUTHOR
Alois P. Heinz, Sep 13 2019
STATUS
approved