|
|
A074350
|
|
Numbers n such that n and the n-th prime have the same digits.
|
|
4
|
|
|
321, 1384, 1395, 2632, 3751, 4980, 5790, 6106, 6331, 6347, 6397, 6432, 6457, 6581, 6714, 6780, 6931, 7119, 7192, 7341, 7345, 7384, 7795, 7908, 8305, 8351, 8355, 9154, 9551, 10126, 10136, 10169, 10217, 10391, 10396, 10703, 12337, 12434, 12933, 13054, 13074
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
Prime(1384) = 11483 which has the same digits as 1384, so 1384 belongs to the sequence.
|
|
MATHEMATICA
|
Select[Range[10^4], Union[IntegerDigits[ # ]] == Union[IntegerDigits[Prime[ # ]]] &]
|
|
PROG
|
(Python)
from sympy import nextprime
from itertools import islice
def agen():
k, pk = 1, 2
while True:
if set(str(k)) == set(str(pk)): yield k
k, pk = k+1, nextprime(pk)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|