g | x | w | all
Bytes Lang Time Link
421Bespoke250818T082308ZJosiah W
120AWK250805T171411Zxrs
011Vyxal 3250802T204528ZThemooni
288SageMath230415T065855Z138 Aspe
015Stax230403T145838Zemirps
01005AB1E230225T201649ZThe Thon
213brainfuck230226T184904ZLevel Ri
01005AB1E230226T185514ZKevin Cr
055JavaScript Node.js230226T121224ZThe Thon
045Factor230226T004006Zchunes
059Perl 5230226T011257ZKjetil S
055Python 3230226T104933ZSisyphus
066JavaScript V8230225T214429ZArnauld
145Excel230226T075104ZJos Wool
009Vyxal230225T202359ZThe Thon
040Bash + bsdgames + coreutils230226T035607ZDigital
029Charcoal230225T220540ZNeil
015Japt230225T230845Znoodle p
064Wolfram Language Mathematica230225T214306ZZaMoC
072Retina 0.8.2230225T213124ZNeil
009Jelly230225T200036Zcaird co

Bespoke, 421 bytes

all real numbers prime(if not ten/even greater)is:seven,and two,five,three
if numbers are all made prime in the digital way,what are these?we discuss
the full set of prime numbers has lots of entries;still,the set only of any prime-digital one has fewer
if the set had no limit,numbers may be useless for any of maths you can do
but luckily,all of it can show
getting from index will act like so:given N,at index,output N

Given a number n, outputs the nth term in the sequence.

Each of the terms are hardcoded, which takes up most of the program; the snippet given N,at index,output N is what retrieves and outputs the correct term.

AWK, 120 bytes

END{for(i=1;i++<1e4;){for(j=1;i%++j;);for(k=z=0;k++<4;)z+=gsub(substr("2357",k,1),"&",i)~1
if(j~i&&z~length(i))print i}}

Attempt This Online!

END{for(i=1;i++<1e4;){              # to 10k
for(j=1;i%++j;);                    # prime check
for(k=z=0;k++<4;)                   # traverse 2357
z+=gsub(substr("2357",k,1),"&",i)~1 # count uniques
if(j~i&&z~length(i))                # if prime and all unique
print i}}                           # output

Vyxal 3, 11 bytes

kæʎf:℗A$/u∧

Vyxal It Online!

kæʎf:℗A$/u∧­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁣‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁤‏⁠‎⁡⁠⁢⁢‏⁠‎⁡⁠⁢⁣‏‏​⁡⁠⁡‌⁤​‎‎⁡⁠⁢⁡‏⁠‎⁡⁠⁢⁤‏⁠‎⁡⁠⁣⁣‏‏​⁡⁠⁡‌⁢⁡​‎‎⁡⁠⁣⁡‏⁠‎⁡⁠⁣⁢‏‏​⁡⁠⁡‌­
kæ           # ‎⁡all primes
  ʎ          # ‎⁢filtered by
   f ℗A      # ‎⁣are the digits all prime?
    :  $  ∧  # ‎⁤and
        /u   # ‎⁢⁡are the digits all different (invariant under unique)
💎

Created with the help of Luminespire.

<script type="vyxal3">
kæʎf:℗A$/u∧ }10⊖
           ##^force snippet to terminate after 10
</script>
<script>
    args=[]
</script>
<script src="https://themoonisacheese.github.io/snippeterpreter/snippet.js" type="module"/>

SageMath, 288 bytes

Golfed version, run it online!

from itertools import permutations, chain, combinations; from sage.all import is_prime; print([int(''.join(map(str, p))) for p in chain.from_iterable(permutations(s) for s in chain.from_iterable(combinations({2, 3, 5, 7}, r) for r in range(1, 5))) if is_prime(int(''.join(map(str, p))))])

Ungolfed version, run it online!

from itertools import permutations, chain, combinations
from sage.all import is_prime

digits = {2, 3, 5, 7}
subsets = chain.from_iterable(combinations(digits, r) for r in range(1, len(digits) + 1))
perms = chain.from_iterable(permutations(s) for s in subsets)
nums = (int(''.join(map(str, p))) for p in perms)
primes = [n for n in nums if is_prime(n)]

print(primes)

Stax, 15 bytes

¢\W░i*δÿ╛ñê╠≤▬J

Run and debug it

This is Packed Stax, which when unpacked represents the following 18 bytes

VIfEccu=^+_+{|pm|A

Run and debug it

VIf                # filter the following over infinity
   E cu=           # Are all the digits in the number unique?
    c   ^+         # Increment this and add it to the list (yielding prime value 2 for truthy)
          _+       # add the current value to the list
                |A # are all of the values in this list
            {|pm   # prime?

05AB1E, 14 11 10 bytes

∞ʒÐÙQiDªpP

Try it online!

Doesn't halt after printing all of them so you'll have to press the stop button.

-1 thanks to @KevinCruijssen

Explanation

∞ʒ          # All positive integers filtered by:
  DÙQ       #  Digits are unique
     i      # And:
      Dª    #  Its digits with itself appended
        pP  #  Are all prime

brainfuck, 213 bytes

-[----->+>+>+<<<]>-.---.>.<.>++.<.>++.<.>>-.+.<<.>>.<.<.>--.>.<<.>++.>.<<.>>-.<--.++.<.>--.>.+.<<.>>-.+.<.++.<.>>-.<.--.>+.<<.>>.-.<.++.<.>>+.<--.>-.<++.<.>--.>.+.<++.<.>--.>-.<++.>+.<<.>.>-.<--.>+.<<.>++.--.>-.+.

Try it online!

Sets up 3 cells with ASCII 255/5=51 (character 3) then produces the output hunt and peck style (with increments and decrements as necessary).

Cell 1 is used to print 2 and thereafter the separator /

Cell 2 is used to print 3 5 7 and thereafter the digits 5 & 7

Cell 3 is used to print the digits 2 and 3

It's possible that a 4th cell may lead to shorter code by allowing separate cells to be used for 5 and 7. I may investigate this later.

05AB1E, 10 bytes

₄ÅpʒÐÙSpÏQ

Outputs the entire sequence.

Try it online.

Alternative 10-byter that I deemed different enough for its own answer. Make sure to upvote @TheThonnu's 10-bytes 05AB1E answer as well!

Explanation:

₄           # Push 1000
 Åp         # Pop and push a list of the first 1000 prime numbers (up to 7919)
   ʒ        # Filter it by:
    Ð       #  Triplicate the prime number
     Ù      #  Pop one copy, and uniquify its digits
      Sp    #  Check for each unique digit whether it's a prime number
        Ï   #  Pop another copy, and only keep its digits at the truthy indices
         Q  #  Check if the two integers are still the same
            # (after which the filtered list is output implicitly)

JavaScript (Node.js), 58 57 55 bytes

n=>'%5Iāȋवુಹ෇ᑵᒙ᱕ᵣ'.charCodeAt(n)

Try it online!

Port of Sisyphus's Python answer.

-3 thanks to @Arnauld

Factor,  64  45 bytes

[ "%5Iāȋवુಹ෇ᑵᒙ᱕ᵣ"nth ]

Try it online!

-19 by porting Sisyphus' Python answer.

Returns the nth number in the sequence.

Perl 5, 59 bytes

(1x$_)!~/^(11+)\1+$/&/^[2357]+$/&!/(.).*\1/&&say for 2..1e4

Try it online!

Python 3, 55 bytes

lambda x:ord('%5Iāȋवુಹ෇ᑵᒙ᱕ᵣ'[x])

Try it online!

JavaScript (V8), 66 bytes

Prints the sequence and keeps looping forever.

{for(n=x=2;;)n%--x||x>1|/(.).*\1|[^2357]/.test(x=n++)||print(n-1)}

Try it online!

JavaScript (V8), 71 bytes

Prints the sequence and stops.

{for(n=x=2;n<8e3;)n%--x||x>1|/(.).*\1|[^2357]/.test(x=n++)||print(n-1)}

Try it online!

Excel, 145 bytes

=LET(
    a,SEQUENCE(6^5),
    b,FILTER(a,MMULT(N(LEN(a)-LEN(SUBSTITUTE(a,{2,3,5,7},""))=1),{1;1;1;1})=LEN(a)),
    FILTER(b,MMULT(N(MOD(b,TOROW(a))=0),a^0)=2)
)

Vyxal, 12 11 9 bytes

Þp~Þu'fæA

Try it Online!

Prints the sequence infinitely.

Saved a byte by using a trick from caird's Jelly answer.
Saved 2 bytes thanks to emanresu A.

Explanation

Þp~Þu'fæA
Þp         # All primes
  ~Þu      # Filtered by are their digits unique
     'fæA  # Filtered by are their digits all prime

Old:

Þun:fpæA∧)l
         )l  # First n non-negative integers where:
Þu           #  It has unique digits
        ∧    #  And
  n:fp       #  Its digits with it prepended
      æA     #  All are prime

Bash + bsdgames + coreutils, 40

primes 2 7777|egrep -v '[^2357]|(.).*\1'

Try it online!

Charcoal, 29 bytes

IΦ×φχ∧⬤”)∨∧i#”‹№IιIμIλ⬤…²ι﹪ιλ

Try it online! Link is to verbose version of code. Explanation:

   φ                        Predefined variable `1000`
  ×                         Multiplied by
    χ                       Predefined variable `10`
 Φ                          Filtered where
       ”...”                Compressed string `1122121211`
      ⬤                     All characters satisfy
             №              Count of
                 μ          Inner index
                I           Cast to string
               ι            In outer value
              I             Cast to string
            ‹               Is less than
                   λ        Current character
                  I         Cast to integer
     ∧                      Logical And
                     …      Range from
                      ²     Literal integer `2`
                       ι    To current value
                    ⬤       All values satisfy
                         ι  Outer value
                        ﹪   Modulo (i.e. is not divisible by)
                          λ Inner value
I                           Cast to string
                            Implicitly print

34 bytes for a less inefficient version:

⊞υωFυF⁺ι⁻⪪2357¹⪪ι¹⊞υκIΦIυ∧ι⬤…²ι﹪ιλ

Try it online! Link is to verbose version of code. Explanation:

⊞υω

Start with the empty string.

Fυ

Loop over the strings of digits.

F⁺ι⁻⪪2357¹⪪ι¹

Append each prime digit that isn't yet present.

⊞υκ

Save the new strings to the list of numbers with distinct prime digits.

IΦIυ∧ι⬤…²ι﹪ιλ

Output only those strings that represent primes.

33 bytes by using the newer version of Charcoal on ATO:

⊞υωF⁴«≔ΣE2357⁺κΦυ¬№μκυIΦIυ⬤…²κ﹪κμ

Attempt This Online! Link is to verbose version of code. Explanation:

⊞υω

Start with the empty string.

F⁴«

Loop 4 times.

≔ΣE2357⁺κΦυ¬№μκυ

For each prime digit, prefix it to all previous strings that do not already contain that digit, and concatenate all of the resulting lists.

IΦIυ⬤…²κ﹪κμ

Output only those strings that represent primes.

Japt, 15 bytes

Èì_â fjöX©j}jU

Try it

Outputs the first \$n\$ entries in the sequence.

Explanation:

Èì_â fjöX©j}jU  # input stored in U
È           }jU  # get first U numbers where the following is true:
 ì_              # convert to digits
   â             #   keep unique digits
     fj          #   remove non-prime digits
       öX       # does this result in the same number?
          ©j     # and check the original is prime

Wolfram Language (Mathematica), 64 bytes

Select[FromDigits/@Join@@Permutations/@Subsets@{2,3,5,7},PrimeQ]

Try it online!

Retina 0.8.2, 72 bytes


1¶11¶111¶4$*
+%1`1
2$'¶$`3$'¶$`5$'¶$`7
A`(.).*\1
.+
$*
A`^(11+)\1+$
%`1

Try it online! Outputs all the terms of the sequence. Explanation:


1¶11¶111¶4$*

Insert 1, 2, 3, and 4 1s.

+%1`1
2$'¶$`3$'¶$`5$'¶$`7

Expand into all possible integers with up to 4 prime digits.

A`(.).*\1

Remove integers with duplicate digits.

.+
$*

Convert to unary.

A`^(11+)\1+$

Filter out composite numbers.

%`1

Convert to decimal.

Jelly, 11 9 bytes

;DẒ;ŒQẠµ#

Try it online!

Takes \$1 \le n \le 18\$ on STDIN and returns the first \$n\$

How it works

;DẒ;ŒQẠµ# - Main link. Takes no arguments
       µ  - Previous chain as a monad f(k):
 D        -   Digits of k, D
;         -   Prepnd k
  Ẓ       -   Prime?
    ŒQ    -   Unique sieve; Cast k to digits, replace a digit with a 1 if it hasn't appeared before, else 0
   ;      -   Concatenate the two lists
      Ạ   -   All truthy?
        # - Read n from STDIN. Starting k=0, count up until n k's return true under f(k)

The way ŒQ works can be shown e.g. with \$k = 75523\$:

   [7, 5, 5, 2, 3]
ŒQ:[1, 1, 0, 1, 1]

It auto-casts \$k\$ to digits, then replaces all but the first occurence of each element with 0.