OFFSET
1,3
COMMENTS
Conjecture: Every odd prime occurs in this sequence infinitely many times.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
MAPLE
b:= proc() true end:
a:= proc(n) option remember; local h, k, p;
if n=1 then 1
else h:= a(n-1);
for k do p:=parse(cat(h, k));
if b(p) and isprime(p) then break fi
od; b(p):= false; k
fi
end:
seq(a(n), n=1..100); # Alois P. Heinz, Sep 18 2015
PROG
(PARI) A077202(nmax)= { local(a, tst, hadp, hSet) ; a=[1] ; hadp=[1] ; for(n=2, nmax, for(new=1, 10000, tst=Str(eval(a[n-1]) eval(new)) ; tst=eval(tst) ; if(isprime(tst), hSet=Set(hadp) ; if( setsearch(hSet, tst)==0, hadp=concat(hadp, tst) ; a=concat(a, new) ; break ; ) ; ) ; ) ; ) ; return(a) ; } { print(A077202(80)) ; } - R. J. Mathar, May 19 2006
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 02 2002
EXTENSIONS
Corrected and extended by R. J. Mathar, May 19 2006
Offset corrected by Alois P. Heinz, Sep 18 2015
STATUS
approved