login
A356980
Numbers k such that prime(k) can be written using only the digits of k (but they may used multiple times).
0
137, 187, 321, 917, 1098, 1346, 1347, 1349, 1362, 1367, 1384, 1395, 1528, 1583, 1850, 1859, 1876, 1973, 2415, 2490, 2517, 2631, 2632, 2970, 3417, 3529, 3573, 3575, 3590, 3598, 3751, 3785, 3860, 4301, 4537, 4591, 4639, 4927, 4980, 4983, 5231, 5319, 5342, 5790, 6106, 6107
OFFSET
1,1
COMMENTS
The digits of k can be reused. In other words, the distinct digits of prime(k) form a subset of the set of the distinct digits of k.
This sequence is infinite as every pandigital number is in this sequence, see A171102.
EXAMPLE
The 137th prime number is 773, which can be written with the digits of 137. Thus 137 is in this sequence.
MATHEMATICA
Select[Range[10000], SubsetQ[Sort[IntegerDigits[#]], Sort[IntegerDigits[Prime[#]]]] &]
PROG
(Python)
from sympy import nextprime
from itertools import count, islice
def agen(): # generator of terms
pk = 2
for k in count(1):
if set(str(pk)) <= set(str(k)): yield k
pk = nextprime(pk)
print(list(islice(agen(), 46))) # Michael S. Branicky, Sep 09 2022
CROSSREFS
Sequence in context: A179912 A108382 A106280 * A139510 A142651 A214265
KEYWORD
nonn,base
AUTHOR
Tanya Khovanova, Sep 09 2022
STATUS
approved