Skip to main content
link to question
Source Link
Bob th
  • 309
  • 1
  • 3

Primes with Distinct Prime Digits

There are 18 primes with distinct prime digits (A124674). Namely, they are:

\$2, 3, 5, 7, 23, 37, 53, 73, 257, 523, 2357, 2753, 3257, 3527, 5237, 5273, 7253, 7523\$

Your task is to output this sequence.

RulesPrimes with Distinct Prime Digits

  • rules apply. This means valid solutions may use any of the following formats:
    • Given some index \$n\$ it can return the \$n\$-th entry of the list.
    • Given some index \$n\$ it can return all entries up to the \$n\$th one in the sequence.
    • Without taking any index, it can output all entries by e.g. ...
      • ...printing them one by one (potentially infinitely) or...
      • ...returning a list (lazy if the sequence is infinite) or...
      • ...returning a generator that represents the whole sequence.
  • If taken, you may assume the input \$n\$ is always valid. (with 0-based indexing, \$ 0 \le n \le 17 \$; with 1-based indexing, \$ 1 \le n \le 18 \$)
  • This is ; fewest bytes wins.
  • Standard loopholes apply.

Primes with Distinct Prime Digits

There are 18 primes with distinct prime digits (A124674). Namely, they are:

\$2, 3, 5, 7, 23, 37, 53, 73, 257, 523, 2357, 2753, 3257, 3527, 5237, 5273, 7253, 7523\$

Your task is to output this sequence.

Rules

  • rules apply. This means valid solutions may use any of the following formats:
    • Given some index \$n\$ it can return the \$n\$-th entry of the list.
    • Given some index \$n\$ it can return all entries up to the \$n\$th one in the sequence.
    • Without taking any index, it can output all entries by e.g. ...
      • ...printing them one by one (potentially infinitely) or...
      • ...returning a list (lazy if the sequence is infinite) or...
      • ...returning a generator that represents the whole sequence.
  • If taken, you may assume the input \$n\$ is always valid. (with 0-based indexing, \$ 0 \le n \le 17 \$; with 1-based indexing, \$ 1 \le n \le 18 \$)
  • This is ; fewest bytes wins.
  • Standard loopholes apply.
added 399 characters in body
Source Link
Bob th
  • 309
  • 1
  • 3

Find the nth PrimePrimes with Distinct Prime Digits

There are 18 primes with distinct prime digits (A124674). Namely, they are:

\$2, 3, 5, 7, 23, 37, 53, 73, 257, 523, 2357, 2753, 3257, 3527, 5237, 5273, 7253, 7523\$

Given an input of \$n\$, yourYour task is to find the \$n\$th number in theoutput this sequence.

Rules

  • You rules apply. This means valid solutions may use 0-based indexing (such that \$0\$ outputs \$2\$ and so forth) or 1-based indexing (such that \$1\$ outputs \$2\$ and so forth)any of the following formats:
    • Given some index \$n\$ it can return the \$n\$-th entry of the list.
    • Given some index \$n\$ it can return all entries up to the \$n\$th one in the sequence.
    • Without taking any index, it can output all entries by e.g. ...
      • ...printing them one by one (potentially infinitely) or...
      • ...returning a list (lazy if the sequence is infinite) or...
      • ...returning a generator that represents the whole sequence.
  • YouIf taken, you may assume the input \$n\$ is always valid. (with 0-based indexing, \$ 0 \le n \le 17 \$; with 1-based indexing, \$ 1 \le n \le 18 \$)
  • This is ; fewest bytes wins.
  • Standard loopholes apply.

Find the nth Prime with Distinct Prime Digits

There are 18 primes with distinct prime digits (A124674). Namely, they are:

\$2, 3, 5, 7, 23, 37, 53, 73, 257, 523, 2357, 2753, 3257, 3527, 5237, 5273, 7253, 7523\$

Given an input of \$n\$, your task is to find the \$n\$th number in the sequence.

Rules

  • You may use 0-based indexing (such that \$0\$ outputs \$2\$ and so forth) or 1-based indexing (such that \$1\$ outputs \$2\$ and so forth)
  • You may assume the input \$n\$ is always valid. (with 0-based indexing, \$ 0 \le n \le 17 \$; with 1-based indexing, \$ 1 \le n \le 18 \$)
  • This is ; fewest bytes wins.
  • Standard loopholes apply.

Primes with Distinct Prime Digits

There are 18 primes with distinct prime digits (A124674). Namely, they are:

\$2, 3, 5, 7, 23, 37, 53, 73, 257, 523, 2357, 2753, 3257, 3527, 5237, 5273, 7253, 7523\$

Your task is to output this sequence.

Rules

  • rules apply. This means valid solutions may use any of the following formats:
    • Given some index \$n\$ it can return the \$n\$-th entry of the list.
    • Given some index \$n\$ it can return all entries up to the \$n\$th one in the sequence.
    • Without taking any index, it can output all entries by e.g. ...
      • ...printing them one by one (potentially infinitely) or...
      • ...returning a list (lazy if the sequence is infinite) or...
      • ...returning a generator that represents the whole sequence.
  • If taken, you may assume the input \$n\$ is always valid. (with 0-based indexing, \$ 0 \le n \le 17 \$; with 1-based indexing, \$ 1 \le n \le 18 \$)
  • This is ; fewest bytes wins.
  • Standard loopholes apply.
Formatting
Source Link
The Thonnu
  • 18.3k
  • 7
  • 9

Find the nth Prime with Distinct Prime Digits

There are 18 primes with distinct prime digits (A124674). Namely, they are:

2, 3, 5, 7, 23, 37, 53, 73, 257, 523, 2357, 2753, 3257, 3527, 5237, 5273, 7253, 7523\$2, 3, 5, 7, 23, 37, 53, 73, 257, 523, 2357, 2753, 3257, 3527, 5237, 5273, 7253, 7523\$

Given an input of n\$n\$, your task is to find the nth\$n\$th number in the sequence.

Rules

  • You may use 0-based indexing (such that 0\$0\$ outputs 2\$2\$ and so forth) or 1-based indexing (such that 1\$1\$ outputs 2\$2\$ and so forth)
  • You may assume the input n\$n\$ is always valid. (with 0-based indexing, 0≤n≤17\$ 0 \le n \le 17 \$; with 1-based indexing, 1≤n≤18\$ 1 \le n \le 18 \$)
  • This is ; fewest bytes wins.
  • Standard loopholes apply.

Find the nth Prime with Distinct Prime Digits

There are 18 primes with distinct prime digits (A124674). Namely, they are:

2, 3, 5, 7, 23, 37, 53, 73, 257, 523, 2357, 2753, 3257, 3527, 5237, 5273, 7253, 7523

Given an input of n, your task is to find the nth number in the sequence.

Rules

  • You may use 0-based indexing (such that 0 outputs 2 and so forth) or 1-based indexing (such that 1 outputs 2 and so forth)
  • You may assume the input n is always valid. (with 0-based indexing, 0≤n≤17; with 1-based indexing, 1≤n≤18)
  • This is ; fewest bytes wins.
  • Standard loopholes apply.

Find the nth Prime with Distinct Prime Digits

There are 18 primes with distinct prime digits (A124674). Namely, they are:

\$2, 3, 5, 7, 23, 37, 53, 73, 257, 523, 2357, 2753, 3257, 3527, 5237, 5273, 7253, 7523\$

Given an input of \$n\$, your task is to find the \$n\$th number in the sequence.

Rules

  • You may use 0-based indexing (such that \$0\$ outputs \$2\$ and so forth) or 1-based indexing (such that \$1\$ outputs \$2\$ and so forth)
  • You may assume the input \$n\$ is always valid. (with 0-based indexing, \$ 0 \le n \le 17 \$; with 1-based indexing, \$ 1 \le n \le 18 \$)
  • This is ; fewest bytes wins.
  • Standard loopholes apply.
Rollback to Revision 1
Source Link
Bob th
  • 309
  • 1
  • 3
Loading
deleted 55 characters in body
Source Link
Bob th
  • 309
  • 1
  • 3
Loading
Source Link
Bob th
  • 309
  • 1
  • 3
Loading