OFFSET
1,1
COMMENTS
Suggested by Kevin L. Schwartz.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
EXAMPLE
a(10) = 121 = 11*11, which becomes the prime 211 when its digits are sorted into nonincreasing order.
MAPLE
h:= proc(m) local k; for k from m+1 while isprime(k) or
add(i[2], i=ifactors(k)[2])<>2 do od; k
end:
a:= proc(n) option remember; local k;
k:= h(a(n-1));
do if isprime(parse(cat(sort(convert(k, base, 10), `>`)[])))
then return k else k:=h(k) fi
od
end: a(0):=0:
seq(a(n), n=1..80); # Alois P. Heinz, Apr 23 2012
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Jonathan Vos Post, Apr 23 2012
EXTENSIONS
More terms from Alois P. Heinz, Apr 23 2012
STATUS
approved