Skip to main content
deleted 1105 characters in body
Source Link
pxeger
  • 25.3k
  • 28
  • 36

Pairs of integers ordered by their exponentiation

Output the infinite list of pairs of integers (a, b), where both \$ a > 1 \$ and \$ b > 1 \$, ordered by the value of \$ a^b \$. When there are multiple pairs where \$ a^b \$ is equal, they should be ordered lexicographically.

For example, \$ 2^4 = 4^2 = 16 \$, but (2, 4) should come before (4, 2), because it is lexicographically earlier.

This sequence starts:

2, 2 2, 3 3, 2 2, 4 4, 2 5, 2 3, 3 2, 5 6, 2 7, 2 

Here are the first 100,000 pairs: https://gist.github.com/pxeger/0974c59c38ce78a632701535181ccab4

Rules

  • As with standard challenges, you may choose to either:
    • Take an input \$ n \$ and output the \$ n \$th pair in the sequence
    • Take an input \$ n \$ and output the first \$ n \$ pairs
    • Output the sequence indefinitely, e.g. using a generator
  • You may use \$ 0 \$- or \$ 1 \$-indexing
  • You may use any standard I/O method
  • Standard loopholes are forbidden
  • This is , so the shortest code in bytes wins

MetaPairs of integers ordered by their exponentiation

  • Is this clear enough?
  • Is this a duplicate?

Pairs of integers ordered by their exponentiation

Output the infinite list of pairs of integers (a, b), where both \$ a > 1 \$ and \$ b > 1 \$, ordered by the value of \$ a^b \$. When there are multiple pairs where \$ a^b \$ is equal, they should be ordered lexicographically.

For example, \$ 2^4 = 4^2 = 16 \$, but (2, 4) should come before (4, 2), because it is lexicographically earlier.

This sequence starts:

2, 2 2, 3 3, 2 2, 4 4, 2 5, 2 3, 3 2, 5 6, 2 7, 2 

Here are the first 100,000 pairs: https://gist.github.com/pxeger/0974c59c38ce78a632701535181ccab4

Rules

  • As with standard challenges, you may choose to either:
    • Take an input \$ n \$ and output the \$ n \$th pair in the sequence
    • Take an input \$ n \$ and output the first \$ n \$ pairs
    • Output the sequence indefinitely, e.g. using a generator
  • You may use \$ 0 \$- or \$ 1 \$-indexing
  • You may use any standard I/O method
  • Standard loopholes are forbidden
  • This is , so the shortest code in bytes wins

Meta

  • Is this clear enough?
  • Is this a duplicate?
massively optimised solver ;)
Source Link
pxeger
  • 25.3k
  • 28
  • 36

Pairs of integers ordered by their exponentiation

Output the infinite list of pairs of integers (a, b), where both \$ a > 1 \$ and \$ b > 1 \$, ordered by the value of \$ a^b \$. When there are multiple pairs where \$ a^b \$ is equal, they should be ordered lexicographically.

For example, \$ 2^4 = 4^2 = 16 \$, but (2, 4) should come before (4, 2), because it is lexicographically earlier.

This sequence starts:

2, 2 2, 3 3, 2 2, 4 4, 2 5, 2 3, 3 2, 5 6, 2 7, 2 

Here are the first 200100,000 pairs: https://gist.github.com/pxeger/30378e618415ea9cea7961e0f0381e75https://gist.github.com/pxeger/0974c59c38ce78a632701535181ccab4

Rules

  • As with standard challenges, you may choose to either:
    • Take an input \$ n \$ and output the \$ n \$th pair in the sequence
    • Take an input \$ n \$ and output the first \$ n \$ pairs
    • Output the sequence indefinitely, e.g. using a generator
  • You may use \$ 0 \$- or \$ 1 \$-indexing
  • You may use any standard I/O method
  • Standard loopholes are forbidden
  • This is , so the shortest code in bytes wins

Meta

  • Is this clear enough?
  • Is this a duplicate?

Pairs of integers ordered by their exponentiation

Output the infinite list of pairs of integers (a, b), where both \$ a > 1 \$ and \$ b > 1 \$, ordered by the value of \$ a^b \$. When there are multiple pairs where \$ a^b \$ is equal, they should be ordered lexicographically.

For example, \$ 2^4 = 4^2 = 16 \$, but (2, 4) should come before (4, 2), because it is lexicographically earlier.

This sequence starts:

2, 2 2, 3 3, 2 2, 4 4, 2 5, 2 3, 3 2, 5 6, 2 7, 2 

Here are the first 200 pairs: https://gist.github.com/pxeger/30378e618415ea9cea7961e0f0381e75

Rules

  • As with standard challenges, you may choose to either:
    • Take an input \$ n \$ and output the \$ n \$th pair in the sequence
    • Take an input \$ n \$ and output the first \$ n \$ pairs
    • Output the sequence indefinitely, e.g. using a generator
  • You may use \$ 0 \$- or \$ 1 \$-indexing
  • You may use any standard I/O method
  • Standard loopholes are forbidden
  • This is , so the shortest code in bytes wins

Meta

  • Is this clear enough?
  • Is this a duplicate?

Pairs of integers ordered by their exponentiation

Output the infinite list of pairs of integers (a, b), where both \$ a > 1 \$ and \$ b > 1 \$, ordered by the value of \$ a^b \$. When there are multiple pairs where \$ a^b \$ is equal, they should be ordered lexicographically.

For example, \$ 2^4 = 4^2 = 16 \$, but (2, 4) should come before (4, 2), because it is lexicographically earlier.

This sequence starts:

2, 2 2, 3 3, 2 2, 4 4, 2 5, 2 3, 3 2, 5 6, 2 7, 2 

Here are the first 100,000 pairs: https://gist.github.com/pxeger/0974c59c38ce78a632701535181ccab4

Rules

  • As with standard challenges, you may choose to either:
    • Take an input \$ n \$ and output the \$ n \$th pair in the sequence
    • Take an input \$ n \$ and output the first \$ n \$ pairs
    • Output the sequence indefinitely, e.g. using a generator
  • You may use \$ 0 \$- or \$ 1 \$-indexing
  • You may use any standard I/O method
  • Standard loopholes are forbidden
  • This is , so the shortest code in bytes wins

Meta

  • Is this clear enough?
  • Is this a duplicate?
edited body
Source Link
pxeger
  • 25.3k
  • 28
  • 36

Pairs of integers ordered by their exponentiation

Output the infinite list of pairs of integers (a, b), where both \$ a > 1 \$ and \$ b > 1 \$, ordered by the value of \$ a^b \$. When there are multiple pairs where \$ a^b \$ is equal, they should be ordered lexicographically.

For example, \$ 2^4 = 4^2 = 16 \$, but (2, 4) should come before (4, 2), because it is lexicographically earlier.

This sequence starts:

2, 2 2, 3 3, 2 2, 4 4, 2 5, 2 3, 3 2, 5 6, 2 7, 2 

Here are the first 200 pairs: https://gist.github.com/pxeger/989319603a0e526e2849d05bcd40e3ebhttps://gist.github.com/pxeger/30378e618415ea9cea7961e0f0381e75

Rules

  • As with standard challenges, you may choose to either:
    • Take an input \$ n \$ and output the \$ n \$th pair in the sequence
    • Take an input \$ n \$ and output the first \$ n \$ pairs
    • Output the sequence indefinitely, e.g. using a generator
  • You may use \$ 0 \$- or \$ 1 \$-indexing
  • You may use any standard I/O method
  • Standard loopholes are forbidden
  • This is , so the shortest code in bytes wins

Meta

  • Is this clear enough?
  • Is this a duplicate?

Pairs of integers ordered by their exponentiation

Output the infinite list of pairs of integers (a, b), where both \$ a > 1 \$ and \$ b > 1 \$, ordered by the value of \$ a^b \$. When there are multiple pairs where \$ a^b \$ is equal, they should be ordered lexicographically.

For example, \$ 2^4 = 4^2 = 16 \$, but (2, 4) should come before (4, 2), because it is lexicographically earlier.

This sequence starts:

2, 2 2, 3 3, 2 2, 4 4, 2 5, 2 3, 3 2, 5 6, 2 7, 2 

Here are the first 200 pairs: https://gist.github.com/pxeger/989319603a0e526e2849d05bcd40e3eb

Rules

  • As with standard challenges, you may choose to either:
    • Take an input \$ n \$ and output the \$ n \$th pair in the sequence
    • Take an input \$ n \$ and output the first \$ n \$ pairs
    • Output the sequence indefinitely, e.g. using a generator
  • You may use \$ 0 \$- or \$ 1 \$-indexing
  • You may use any standard I/O method
  • Standard loopholes are forbidden
  • This is , so the shortest code in bytes wins

Meta

  • Is this clear enough?
  • Is this a duplicate?

Pairs of integers ordered by their exponentiation

Output the infinite list of pairs of integers (a, b), where both \$ a > 1 \$ and \$ b > 1 \$, ordered by the value of \$ a^b \$. When there are multiple pairs where \$ a^b \$ is equal, they should be ordered lexicographically.

For example, \$ 2^4 = 4^2 = 16 \$, but (2, 4) should come before (4, 2), because it is lexicographically earlier.

This sequence starts:

2, 2 2, 3 3, 2 2, 4 4, 2 5, 2 3, 3 2, 5 6, 2 7, 2 

Here are the first 200 pairs: https://gist.github.com/pxeger/30378e618415ea9cea7961e0f0381e75

Rules

  • As with standard challenges, you may choose to either:
    • Take an input \$ n \$ and output the \$ n \$th pair in the sequence
    • Take an input \$ n \$ and output the first \$ n \$ pairs
    • Output the sequence indefinitely, e.g. using a generator
  • You may use \$ 0 \$- or \$ 1 \$-indexing
  • You may use any standard I/O method
  • Standard loopholes are forbidden
  • This is , so the shortest code in bytes wins

Meta

  • Is this clear enough?
  • Is this a duplicate?
added 218 characters in body
Source Link
pxeger
  • 25.3k
  • 28
  • 36
Loading
Source Link
pxeger
  • 25.3k
  • 28
  • 36
Loading