OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..97 (all terms < 10^9)
EXAMPLE
p(237) = 1489.
MATHEMATICA
Select[Range[1500], Min[Differences[IntegerDigits[#]]]>=0&&Min[ Differences[ IntegerDigits[Prime[#]]]]>=0&] (* Harvey P. Dale, May 14 2019 *)
PROG
(Python)
from sympy import sieve
from itertools import count, islice, combinations_with_replacement as mc
def nd(n): s = str(n); return s == "".join(sorted(s))
def bgen(d): yield from map(int, ("".join(m) for m in mc("123456789", d)))
def agen():
for d in count(1):
yield from (k for k in bgen(d) if nd(sieve[k]))
print(list(islice(agen(), 60))) # Michael S. Branicky, Jun 26 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Giovanni Resta, Feb 13 2006
STATUS
approved