OFFSET
1,1
COMMENTS
Primes with digits already in ascending order (like 13 and 2357) are trivial cases and are therefore excluded.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1)=31 because an ascending sort of 31's digits yields 13 which is also prime. a(100)=3527 because an ascending sort of 3527's digits yields 2357 which is also prime.
MATHEMATICA
sdaQ[n_]:=Module[{idn=IntegerDigits[n], srt}, srt=Sort[idn]; !MemberQ[ idn, 0] &&idn!=srt&&PrimeQ[FromDigits[srt]]]; Select[Prime[Range[300]], sdaQ] (* Harvey P. Dale, Dec 14 2014 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Chuck Seggelin (barkeep(AT)plastereddragon.com), Jul 07 2003
STATUS
approved