OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
6347 is a term because prime(6347) = 63347.
886 is a term because prime(886) = 6883.
11 is not a term because prime(11) = 31, which does not contain two 1's.
MATHEMATICA
okQ[n_] := Module[{idnp=IntegerDigits[Prime[n]], sidn=Sort[IntegerDigits[n]]}, Intersection[idnp, sidn]==sidn]; Select[Range[10000], okQ]
PROG
(Python)
from sympy import nextprime
from collections import Counter
from itertools import count, islice
def agen2(): # generator of terms
pk = 2
for k in count(1):
cpk, ck = Counter(str(pk)), Counter(str(k))
if all(cpk[d] >= ck[d] for d in ck): yield (k, pk)
pk = nextprime(pk)
print(list(islice(agen2(), 47))) # Michael S. Branicky, Sep 10 2022
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Harvey P. Dale, Mar 13 2003
EXTENSIONS
Missing terms inserted by Michael S. Branicky, Sep 10 2022
STATUS
approved