[Question]
  [
All integers \$n > 0\$ can be expressed in the form
$$n = \prod\_{\text{prime } p} p^e = 2^{e\_2} 3^{e\_3} 5^{e\_5} 7^{e\_7} \cdots$$
This form is also known as it's [prime factorisation](https://en.wikipedia.org/wiki/Prime_number#Unique_factorization) or prime decomposition, and each integer has a [unique prime factorisation](https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic).
As the bases are fixed, it is possible to reconstruct an integer when just given a list of the exponents of it's prime factorisation. For example, given \$E = [0,3,2,1,0,2]\$ we can reconstruct \$n\$ as
$$
\begin{align}
n & = 2^0 3^3 5^2 7^1 11^0 13^2 \\
& = 1 \cdot 27 \cdot 25 \cdot 7 \cdot 1 \cdot 169 \\
& = 798525
\end{align}
$$
Therefore, \$[0,3,2,1,0,2] \to 798525\$, and is the only such list (ignoring trailing zeros) that does so.
You are to take an input consisting of non-negative integers representing the exponents of the prime factorisation of some integer and output the integer with that prime factorisation.
Both the integer and the elements of the input will be within the bounds of your language, and you can take input in any [convenient method](https://codegolf.meta.stackexchange.com/questions/2447/default-for-code-golf-input-output-methods). You may have an arbitrary (from 0 to infinite) number of trailing zeros in the input. The array will never be empty, but may be `[0]`
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so the shortest code in bytes wins
## Test cases
```
[0] -> 1
[1] -> 2
[3, 2] -> 72
[0, 1, 2] -> 75
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] -> 347
[6, 2] -> 576
[1, 7] -> 4374
[5, 7] -> 69984
[10, 5] -> 248832
[1, 0, 0, 8, 4] -> 168804902882
[3, 8, 10] -> 512578125000
[7, 9, 0, 8] -> 14523977994624
[4, 4, 7, 0, 0, 5, 5] -> 53377275216476250000
[1, 8, 1, 7, 8, 1] -> 150570936449966222190
[10, 0, 2, 8, 9] -> 347983339699826969600
[4, 8, 2, 3, 7, 9] -> 186021488852335961308083600
[7, 6, 6, 8, 6, 8, 4] -> 1014472920935186644572261278658000000
[9, 6, 7, 5, 1, 8, 10] -> 8865565384329431006794755470280000000
```
  
[Answer]
# [Python 2](https://docs.python.org/2/), 61 bytes
Wilson's theroem FTW!
```
f=lambda p,a=1,b=1:p==[]or b**(a%b*p[0])*f(p[a%b:],a*b*b,b+1)
```
[Try it online!](https://tio.run/##3VHtitswEPzvp9CfcrarltVK@6GA@yImFJteuEAuEWmuR58@3Ujn0mcoCHkH7czujMvv28vljPf7YTotr@uPxRW/TMGvU9iVaZr3l6tbx7FfPq1jmWE/jIe@zIZ2e7@M67j69XMY7u8vx9OzC7vOHc/Fu8vbrbjJvS6lf/61nLy7Lu/f7eXt1g9ff5bT8dY/uS/f3NMwdK5cj@ebO/T2PrhpquS7jXo0hG4OtcBujt5hrcUAeBf@Yqr4vznNcUzSzbx5JGGLwjupKEVJ3Uwb5JzVcDAutbSSasRKaJLqXWqBsiqkDKjaIrWX0LKmgCRqFwB0s3iXG7XxEmHMIjknRpuVTNDGb/q0TaYYRVAIAyfhqgV1D60/TFrRJAlIIEdOKWdmRAwZmgs7WDvzFkXWGGN@GEW2Dz9UU22xxliFW29QBgzmX23hSJlDBAWN/GGK69Ht/kgFQkqCGW0dMgVbiQSRA4oyKUCzkStLqt3wb3RqXcQUNUXMKQYAlpyEKIkl3ejwBw "Python 2 – Try It Online")
### [Python 2](https://docs.python.org/2/), 62 bytes
```
f=lambda p,a=1,b=1:p==[]or(a%b<1or b**p.pop(0))*f(p,a*b*b,b+1)
```
[Try it online!](https://tio.run/##3VHtatwwEPzvp9CfEtt1wmql/VCo@yImFJvmyMHlLK5OQp/@uifFpc9QWGQtOzPaGeff28t6xuv1MJ7m1@Xn7PIwj35YRv@Yx3F6Wi/t/GX55teLW/o@P@Q1t9B1/aE1YL/0y7B89d314@V4enb@sXHHcx7c@rZlN7rXObfP7/NpcJf544dN3ra2e/iVT8etvXP3391d1zUuX47nzR1am3duHAv5OsHTDeCbyZcLNlMYHJa7WAOD8397Kv1/U9VxiNJMvHskYYticFK6GCQ2E@0tp6TWe@NSTSuqBiyEKqmDizVQVoWYAFVrpDbxNWvySKJ2AEAzyeBSpVZeJAxJJKXIaG9FE7Tnd33aX6YQRFAIPUfhogVlDy0/TOqlShKQQAocY0rMiOgTVBdWWJBpjyJpCCHdjCLbh2@qsUAMGIpwxXplQG/@1RYOlNgHUNDAn6a4lO7nZyrgYxRMaOuQKdhKJIjsUZRJAaqNVFhS7Pp/o1NDEVPQGDDF4AFYUhSiKJZ0pcMf "Python 2 – Try It Online")
[Answer]
# [J](http://jsoftware.com/), 13 7 bytes
```
_&q:inv
```
[Try it online!](https://tio.run/##3ZA9CgJBDIX7PcXDwkUYl8xPkpmBrQQrKy9gIS66hWLj9cdlxr2EIQm8F17xZS6boZ8wZvQwIORl9gMO59OxXLbv/Hh@yq7rutv1/oLFiAnUhKvCNqHcTgbWwDXPB13Nv@kfLqtUNFlZYxRmYR@Ddyl4SySagjIHJRepVY0kAzFQA66/issmlC8 "J – Try It Online")
As described [here](https://code.jsoftware.com/wiki/Vocabulary/qco#dyadic), the verb `_ q: n` returns the prime exponents of `n`. So the inverse `inv` of that verb is exactly what we want.
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 28 bytes
```
1##&@@(i=0;Prime@++i^#&/@#)&
```
[Try it online!](https://tio.run/##3VBLCoMwEN17ikAgtJhS4y8JxZIjFLosLQRRzEIXxZ3o1dNkTPAOhWG@781v1PPQjXo2rbZ9YxnGRKmTabLb42vGTqWp@WByVfhMrMtM8wtf7r3Cb7I9Wz1tS7JkK00W5lVBUe5tRhE73L8RuLEOh7kDubdVsMwBqlDY4YKiMnzFuQzexCmSe9FHpUM4eiRURwcBH@S7E9s7ySEjA1lAogCgDO1rEBE1bCAh4jCBxW2S1f4A "Wolfram Language (Mathematica) – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 2 bytes
```
ÆẸ
```
[Try it online!](https://tio.run/##y0rNyan8//9w28NdO/4fbn/UtCby//9og1idaEMgNtZRMAJSBjoKhnDWsEEgD5pBvAX0nTmQMoVQhkBJU4goRKWFjoIJJDSALENQ4JjrKFhCpIAcE6A0UCdMtSlctwU43MwhDKjBQGQEFrCE6LQA843ByiwhJpuBkQWMBFltCeaYgw03hDkDAA "Jelly – Try It Online")
Just the builtin.
# [Jelly](https://github.com/DennisMitchell/jelly), 6 bytes
```
JÆN*µP
```
[Try it online!](https://tio.run/##y0rNyan8/9/rcJuf1qGtAf8Ptz9qWhP5/3@0QaxOtCEQG@soGAEpAx0FQzhr2CCQB80g3gL6zhxImUIoQ6CkKUQUotJCR8EEEhpAliEocMx1FCwhUkCOCVAaqBOm2hSu2wIcbuYQBtRgIDICC1hCdFqA@cZgZZYQk83AyAJGgqy2BHPMwYYbwpwBAA "Jelly – Try It Online")
If those brownie points are attainable, it's going to be hard!
```
 ÆN       n-th prime
J         for each n in 1 .. len(input).
   *      Raise each prime to the corresponding exponent,
    µ     then
     P    output the product.
```
[Answer]
# [Factor](https://factorcode.org/) + `math.primes`, 43 bytes
```
[| x | 1 x length nprimes x [ ^ * ] 2each ]
```
-3 from Leo
[Try it online!](https://tio.run/##LYyxCsIwFEV3v@LODqUtuOgHiIuLOJUKIbzaYvKSJilE2n57jNXlci4HTidkMC7db5fr@YgXOSYFZaRQHtZRCG/rBg7QIvTbFPlr8j/uJpZhMOzhaZyIZRan3YwZJSrUWDf6blXikGFNzYKIJdsIRfzMVf4XIxo8sEeLmoTs0SYtLIr0AQ "Factor – Try It Online")
[Answer]
# [Factor](https://factorcode.org) + `math.primes math.unicode`, ~~38~~ 33 bytes
```
[ dup length nprimes swap v^ Π ]
```
[Try it online!](https://tio.run/##S0tMLskv@h8a7OnnbqWQnVqUl5qjUFCUWlJSWVCUmVeikJtYkqEHZOamFkPYpXmZyfkpqRBOWSpIe7FCcWphaWpeMlCNNVe1QrWCgYKhgpGCsUItmA0iTRQMTYGM2v/RCimlBQo5qXnpJRkKeVCTi8sTCxTK4hTOLVCI/Z8LZOv9BwA "Factor – Try It Online")
Explanation:
* `dup` duplicate the input (e.g.) `{ 0 1 2 3 } { 0 1 2 3 }`
* `length` find the length of a sequence `{ 0 1 2 3 } 4`
* `nprimes` generate primes given the number on top of the data stack `{ 0 1 2 3 } { 2 3 5 7 }`
* `swap` swap the top two objects on the data stack `{ 2 3 5 7 } { 0 1 2 3 }`
* `v^` vector exponentiation (component-wise) `{ 1 3 25 343 }`
* `Π` find the product of a sequence `25725`
# [Factor](https://factorcode.org) + `math.primes math.unicode`, ~~38~~ 33 bytes
```
[ [ length nprimes ] keep v^ Π ]
```
An equivalent answer using the data flow combinator `keep` instead of stack shufflers. Data flow combinators generally keep the data stack more static and easier to reason about than stack shufflers.
[Try it online!](https://tio.run/##S0tMLskv@h8a7OnnbqWQnVqUl5qjUFCUWlJSWVCUmVeikJtYkqEHZOamFkPYpXmZyfkpqRBOWSpIe7FCcWphaWpeMlCNNVe1QrWCgYKhgpGCsUItmA0iTRQMTYGM2v/RCtEKOal56SUZCnlQc2OBFqcWKJTFKZxboBD7PzexQEHvPwA "Factor – Try It Online")
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal) `r`, 4 bytes
```
ẏǎeΠ
```
[Try it Online!](https://lyxal.pythonanywhere.com?flags=r&code=%E1%BA%8F%C7%8Ee%CE%A0&inputs=%5B5%2C%207%5D&header=&footer=)
```
ẏǎeΠ
ẏ     # range(0, len(input))
 ǎ    # nth_prime(^) // vectorises
  e   # ^ ** input // vectorises element-wise
   Π  # product(^)
```
The `r` flag tells Vyxal to pass arguments to built-ins in reverse order. It's been around before this challenge, so I didn't add it to cheat this one time. Without it, this would be 5 bytes (`ẏǎ$eΠ`)
[Answer]
# [Husk](https://github.com/barbuz/Husk), 6 bytes
```
Πz`^İp
```
[Try it online!](https://tio.run/##yygtzv7//9yCqoS4IxsK/v//H22pY6ZjrmOqY6hjoWNoEAsA "Husk – Try It Online")
## Explanation
```
Πz`^İp implicit input
 z     zip the input
    İp with the infinite list of primes, removing extras
   ^   using the power function,
  `    with flipped arguments.
Π      take its product.
```
[Answer]
# [R](https://www.r-project.org/), ~~83~~ ~~82~~ ~~79~~ ~~78~~ 68 bytes
*Edit: -4 bytes thanks to Kirill L. and -1 byte thanks to Robin Ryder.*
```
function(l,p=1){for(i in l){while(sum(!(T=T+1)%%2:T)-1)1;p=p*T^i};p}
```
[Try it online!](https://tio.run/##3dJLasMwEAbgfU4xpQSkVgGNLFnjBvcUXtcUExOBH0Jx6CLk7K6h2HgjHaAgtPok5vGH2Q1T3Yaxr31w/aVuv5tpDLdybu9DM7lxYJ3wJfJHOwbmwA3Q8cfP1XUXdrv37IVVZfWO/HhUHxU/IcezL/1b9eWeZ/@MfM4aJjmHVzh9Ah6iBlej4iYToFZmE04KwD01SfpvzjbCTNt4x/luMsbmiY0IsCvUmdVxaXYyLwpKUFzqNNuqNVGmkhX8dUYC9JahnEjqQiqidFSWR7glz6AylpZLSnmYfwE "R – Try It Online")
Loops over the list `l` of prime exponents, each time using `while(sum(!(T=T+1)%%2:T)-1)1` to update `T` to the next prime, and multiplying the cumulative product `p` (initialized to 1) by `T` to the power of the current exponent. Finally, returns `p`.
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 13 bytes
```
wᵐ<₁ṗᵐ≜;?z^ᵐ×
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r/qG3Do6amh1snWNtXVZeUKyno2ikoldtnPNzVWQsU/V8OJGweNTU@3DkdyHrUOQeoLg7IOjz9///oaINYnWhDIDbWUTACUgY6CoZw1rBBIA@aQbwF9J05kDKFUIZASVOIKESlhY6CCSQ0gCxDUOCY6yhYQqSAHBOgNFAnTLUpXLcFONzMIQyowUBkBBawhOi0APONwcosISabgZEFjARZbQnmmIMNN4Q5IxYA "Brachylog – Try It Online")
Function submission which dumps some garbage to STDOUT since it saves a byte over `l~l<₁ṗᵐ≜;?z^ᵐ×` or `∧ċ<₁ṗᵐ;?z₂≜^ᵐ×`.
```
wᵐ               Create a list of unbound variables with the same length as the input.
                 (This also prints each element, but that's besides the point.)
  <₁             This list is strictly increasing,
    ṗᵐ           and each of its elements is prime.
      ≜          Assign a value to each element.
       ;?z^ᵐ     Raise each prime to the power of the corresponding element of the input,
            ×    and output the product of the powers.
```
Without the `≜`, it completely breaks given exponents of zero--I suppose because they are mathematically eliminated from the final product?
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 11 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
í!pÈj}jUl¹×
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=7SFwyGp9alVsudc&input=WzAgMyAyIDEgMCAyXQ)
[Answer]
# JavaScript, ~~91~~ ~~86~~ 84 bytes
```
a=>{p=[],r=1;for(i=2;0 in a;i++)r*=p.every(x=>i%x)?i**a.shift(p.push(i)):1;return r}
```
[Try it online!](https://tio.run/##3c9LCsIwFIXhuavIREjSWpKKDwy3LqR0EKSht4MabtNSEdceBUGIuALhTM43@3s72/FC6MNmPkYH0UJ191A3OYE27kocoTSK4cCswSwTJMEX7dzSjS9Q4XoRZ5TSFmOHLnBf@GnsOApx0obaMNHA6BE94RC447VqhFh9nk7eNmdlAipn@of9zdL8/Xfqq/2QwO4N8Qk)
*Saved 2 bytes thanks to [Neil](https://codegolf.stackexchange.com/users/17602)*
## Explanation
```
a=>{
  p=[],//array of primes
  r=1;//product/result
  for(i=2;
     0 in a;
    //if 0 exists as a key in the array, then the first element exists 
    //and it is not empty
    i++)
    r*=
       p.every(x=>i%x)?
      //check if there is a remainder after division with each previous prime
      //if so, then i is prime
         i**a.shift(
            p.push(i)//add to prime array, (shift ignores all arguments)
         ) 
         //multiply result by i to the power of the first 
         //input array element (and remove it)
    :1; //multiply by 1 if i is not prime
    return r 
}
```
[Answer]
# [Haskell](https://www.haskell.org/), ~~83 69~~ 57 bytes
Thanks to thanks to @AZTECCO and @Unrelated String for bringing it down to 57 bytes :)
```
f=product.zipWith(^)(s[2..])
s(x:t)=x:s[y|y<-t,y`mod`x>0]
```
[Try it Online!](https://tio.run/##y0gszk7Nyfmfm5iZp2CrUFCUmVeikaYQbamjYKajYK6jYKqjYKijYAEkDWI1/6fZFhTlp5Qml@hVZRaEZ5ZkaMRpahRHG@npxWpyFWtUWJVo2lZYFUdX1lTa6JboVCbk5qckVNgZxP7/DwA)
**Edit:** Realised that newlines are also one byte so putting multiple lines on a single line with semicolons doesn't change the size.
**Edit #2:** Realised that I don't need to `take (length x)` to my list of primes, zipWith only takes how many it needs to.
**Edit #3:** Reduced to 57 bytes, thanks to thanks to @AZTECCO and @Unrelated String (See Comments)
## Explanation:
(My solution wasn't very difficult to understand but I'm a beginner with Haskell so writing this out helps me xD)
A more readable version would be:
```
sieve (x:xs) = x:sieve [y | y<-xs, y `mod` x > 0]
primes = sieve [2..]
applyExponents x = zipWith (^) primes x
reconstruct = product . applyExponents 
```
Recursive function used to generate a list of primes---use list comprehension to remove multiples of the last prime inserted into the list.
```
sieve (x:xs) = x:sieve [y | y<-xs, y `mod` x > 0]
```
Apply recursive sieve function to an infinite list of natural numbers from 2 onwards to get an infinite list of primes.
```
primes = sieve [2..]
```
~~Use `take (length x)` to evaluate the list of primes and get the right number of prime numbers for the length of list x.~~ Use zipWith to apply the correct exponent to each prime number.
```
applyExponents x = zipWith (^) p x
```
Then use `product` to multiply the list resulting from the previous step together.
```
reconstruct = product . applyExponents 
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~110~~ \$\cdots\$ ~~79~~ 75 bytes
Saved ~~5~~ 9 bytes thanks to [xibu](https://codegolf.stackexchange.com/users/90181/xibu)!!!
```
d;p;r;f(a,l)int*a;{for(r=p=1;l;r*=pow(p,d<2?l--,*a++:0))for(d=++p;p%--d;);}
```
[Try it online!](https://tio.run/##3ZTbjpswEIbv8xQjJCRsjArmvA7di6pPsYkqxGGLyiYIIm3UiFcvHbATiNUnaIQz8f95xvGMmcJ5L4ppKkUnelFbOWtJc7rQXNzqc2/1WZd5ohU9zbrzp9Wxcs9fW8dhNLftF5eQeVGZ2XYnOtNxSkHEOHU9RrBwAM0ZzLYlMIeDRWwgA1eg2UMrwLYbAotHbRnmYJYGw2VZ5sIrGAa8AM4NwiB/a44YfPeRNyeL7G47wM8c7lINlx/u2xGj3jwG6zOKlXuSu1uNK5@t5kvNZ8C3cqDcl8BPJHyQ/@Z5Skgkzxdpx44f@Y63ciLlUJNTtRqDh6O4V44ucJBMVpGpainLlfWVDZQNlY2UjZVNlE3XTUAqrdxlaH5X59qSm5EvakrVnMGWexr3NM41zjXua9zXeKDxQOOhxkONRxqPNB5rPNZ4ovFE46nGU7LJanXtquJSlTKtnPo0pDH15JuHZYvngWXyA6xNGGOhAj/G8kVpmqDhQZL4XMUrfuY9xe@q@FX1MqBxuH7nh2v6DUc4N4DN3DeU39pQTmV1VU1l@bm/H@T@N9ejPJSl88yrsTUt4dZbiaHkzVz4UWwxtIrilfoXHhBjArGLPusV6o@k6Y6yYT473VsiOF/BLMEcDidMxMAeiRqyrDoqh3E3Tn@Kus3fh8n5nJz24y8 "C (gcc) – Try It Online")
Inputs an array of prime exponents and its length \$l\$ (because C arrays have undefined length) and returns the product of the first \$l\$ primes to those exponents.
### Explanation (before some golfs)
```
d;p;r;f(a,l)int*a;{                           // function taking an array of  
                                              // ints and its length l
  for(r=p=1;l--;                              // loop over the array elements  
                                              // setting the product r and  
                                              // the previous prime to 1  
                r*=pow(p,*a++)                // once we've found the next  
                                              // prime multiply r by it  
                                              // to the power of the current  
                                              // value in a    
    for(d=2;d>1;)                             // loop until we find the next  
                                              // prime, d==1 will flag this  
      for(d=++p;                              // set d to p bumped  
                p%--d;)                       // bump d down and loop  
                                              // until we find the highest                      
                                              // divisor of p    
  d=r;                                        // return r
}                                             //   
```
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 106 bytes
```
$s=1;while($n-lt$a.length){if(('1'*(++$i))-notmatch'^1?$|^(11+?)\1+$'){$s*=[math]::pow($i,$a[($n++)])}};$s
```
[Try it online!](https://tio.run/##3cxBCoMwEEDRq2QxkBmjpbNVgr2HVQglbQKpkSaQhfXsqeco/N2Dv8ViP8nZECoYocUNr634m5gqJM1DcT5YhLULGcwl2PWVHe3@iShZNqgUeKJujflt8sPJhUf4LsisRrqzAkk7pEZPp7q577dYEHwLZjqXStFMxzFAqvUH "PowerShell – Try It Online")
Uses a regex to match prime numbers, more about it [here](https://www.noulakaz.net/2007/03/18/a-regular-expression-to-check-for-prime-numbers/)
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~6~~ 2 bytes
```
.Ó
```
[Try it online!](https://tio.run/##yy9OTMpM/f9f7/Dk//@jLXUUzHQUzHUUTHUUDHUULICkQSwA "05AB1E – Try It Online")
```
.Ó  # full program
.Ó  # push the number with a prime factorization with exponents in...
    # implicit input
    # implicit output
```
[Answer]
# [Raku](http://raku.org/), 31 bytes
```
{[*] grep(&is-prime,^∞)Z**$_}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPu/OlorViG9KLVAQy2zWLegKDM3VSfuUcc8zSgtLZX42v/FiZUKSirxCrZ2CtVpCkARJYW0/CIFGwM7HQUbQxBhrGAEogwUDCEMcwVLBQMFC7C8AZBlpGChYGn3HwA "Perl 6 – Try It Online")
`grep(&is-prime, ^∞)` is an infinite, lazy sequence of primes. `Z**` zips that sequence with `$_`, the list argument to the function, using exponentiation. Then `[*]` computes the product of that sequence.
[Answer]
# [Haskell](https://www.haskell.org/), ~~61~~ 56 bytes
```
f=product.zipWith(^)[x|x<-[2..],all((>0).rem x)[2..x-1]]
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P822oCg/pTS5RK8qsyA8syRDI04zuqKmwkY32khPL1YnMSdHQ8POQFOvKDVXoUITJFihaxgb@z83MTNPwVahoCgzr0RBRSEt2lBHwQCMLHQUTGL/AwA "Haskell – Try It Online")
* saved 5 by stealing @Unrelated String advice to @M. Salman Khan answer.
[Answer]
# [APL (Dyalog Extended)](https://github.com/abrudz/dyalog-apl-extended), ~~12~~ 11 bytes
-1 thanks to Adám
```
⊢×.*⍨¯2⍭⍳∘≢
```
```
⊢×.*⍨¯2⍭⍳∘≢
     ¯2⍭⍳∘≢  ⍝ the first n primes
⊢×.*⍨        ⍝ powers and product
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT9dNrShJzUtJTfn/qG9qQMCjtgnGJlxAplsQkGloZGH@/1HXosPT9bQe9a44tN7oUe/aR72bH3XMeNS56H8aUMmj3r5HXc2Petc86t1yaL3xo7aJQM3BQc5AMsTDM/h/moKhgjkXiDQAQgsFEwA "APL (Dyalog Extended) – Try It Online")
[Answer]
# JavaScript (ES7), ~~64~~ 58 bytes
```
a=>(g=d=>a+a?n%--d?g(d):(d>1||n**a.shift())*g(++n):1)(n=2)
```
[Try it online!](https://tio.run/##bcnLCsMgEEDRff@jMOMjaPokoPmQ0oXEaBPCWGroKv9usy5yd@fO7uvy8Jneq6TkxxJMccZCNN5Yx11PRyl9H8FjB97qbSPGXJNfU1gBkUXgnLDTCGRaLEOinJaxWVKEAA/1RDz8ma7YSbQVVUJX/VpVLW4VvVRVC7V3F@f9lR8 "JavaScript (Node.js) – Try It Online")
## With BigInts, 61 bytes
A version that supports large integers. Expects a list of BigInts.
```
a=>(g=d=>a+a?n%--d?g(d):(d<2?d:n**a.shift())*g(++n):1n)(n=2n)
```
[Try it online!](https://tio.run/##XcrLCsIwEIXhve8hzCRNMcVrMM2DiIuhaWKlTMQUXz9qwI1w@Dfnu9OL8vCcHovi5McSbCHbQ7Te9iTJ8Vop7yJ4NODPnfOGhaA236awAKKIICWj0YzAtmMsQ@Kc5rGdU4QAlwM3@7rjr1u@Iq7@2Km@H7zjRlemN19X3g "JavaScript (Node.js) – Try It Online")
### Commented
```
a => (                 // a[] = input array
  g = d =>             // g is a recursive function taking a divisor d
  a + a ?              // if a[] is not empty:
    n % --d ?          //   decrement d; if it's not a divisor of n:
      g(d)             //     do recursive calls until it is
    :                  //   else:
      (                //     multiply the final result by:
        d > 1 ||       //     - 1 if d is greater than 1 (n is composite)
        n ** a.shift() //     - the prime n raised to the power of the next
      )                //       exponent extracted from a[] otherwise
      * g(++n)         //     and multiply by the result of a recursive call
                       //     with n + 1
  :                    // else:
    1                  //   stop the recursion and return 1
)(n = 2)               // initial call to g with d = n = 2
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 29 bytes
```
≔¹ζＦＡ«≦⊕ζＷ﹪⊕Π…¹ζζ≦⊕ζ⊞υＸζι»ＩΠυ
```
[Try it online!](https://tio.run/##fYy9CsIwGEXn9im@8QvEwR9Q6SROHQrBtXQIaWwDMSn5sVDx2WOxIk4udzj3cETPnbBcp3TyXnUG1xQmUuRX6wBLM8SAhMAjzyo@fIzSCCdv0gTZLm429kpLwMq2UdvfH5mbmQh44aaTS5uQ98K/IIu@x0iB2VE6nCgoMuNnzpwyAc/ch285zsEipbreUThQ2FDYUthTODZNWt31Cw "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
≔¹ζ
```
Start finding prime numbers.
```
ＦＡ«
```
Loop over the input list.
```
≦⊕ζＷ﹪⊕Π…¹ζζ≦⊕ζ
```
Increment the integer it until it's prime via Wilson's theorem.
```
⊞υＸζι
```
Take the appropriate prime power.
```
»ＩΠυ
```
Print the product of the resulting prime powers.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 6 bytes
```
ā<ØsmP
```
[Try it online!](https://tio.run/##yy9OTMpM/f//SKPN4RnFuQH//0eb6RjFAgA "05AB1E – Try It Online")
In other words:
```
P         sm        Ø                 ā                   <
product(exponate(nth_prime_number(range(1, len(input())) - 1), input()))
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 11 bytes
```
£Èj}iY pXÃ×
£           // Map the input array with X as items and Y as indexes to
 È }iY      // Y-th positive number
  j         // that is prime
       pX   // to the power of X,
         Ã× // then reduce with multiplication.
```
[Try it out here.](https://ethproductions.github.io/japt/?v=1.4.6&code=o8hqfWlZIHBYw9c=&input=WzAsIDEsIDJd)
[Answer]
# [Retina](https://github.com/m-ender/retina/wiki/The-Language), 83 bytes
```
$
,__
m)+`,(_+)$(?<=\1¶.+)|,(__+)\2+$
$&_
~["L$`^¶$.("|""]'_L$`(.+),(_+)
$1*$($.2$*
```
[Try it online!](https://tio.run/##K0otycxLNPz/X4VLJz6eK1dTO0FHI15bU0XD3sY2xvDQNj1tzRqgCFAoxkhbhUtFLZ6rLlrJRyUh7tA2FT0NpRolpVj1eCBfA6gSrJVLxVBLRUNFz0hF6/9/Ey4LLiMuYy5zLksA "Retina – Try It Online") Takes a newline-separated list. Explanation:
```
$
,__
```
Pair each element of the input array with 2 in unary.
```
+`,(_+)$(?<=\1¶.+)|,(__+)\2+$
$&_
```
Increment each unary part until it is a prime greater than the previous one.
```
m)`
```
Turn on per-line `$` for all of the stages up to and including the above.
```
["L$`^¶$.("|""]'_L$`(.+),(_+)
$1*$($.2$*
```
Transform each pair into a repeated multiplication, so that for example `3,__` becomes three copies of `2*` i.e. `2*2*2*` while `2,___` becomes two copies of `3*` i.e. `3*3*`. Append a `_` to handle the case of zero input, and prepend `L$`^` and `$.(` to create a Retina program that replaces the current value with the total product.
```
~`
```
Evaluate that Retina program. For example, in the case of an input of `3` `2`, the resulting program is as follows:
```
L$`^
$.(2*2*2*3*3*_
```
`3*_` is `$(___)` and so on, with `$.(` taking the final length in decimal (Retina actually optimises this and simply multiplies the values together).
[Answer]
# [R+primes](https://www.r-project.org/), ~~46~~ 43 bytes
Exploiting the primes library
```
prod(primes::nth_prime(seq(a=l<-scan()))^l)
```
[Don't try it online!](https://tio.run/##K/r/P8e2ODkxT0PTuqAoP0WjoCgzN7XYyiqvJCMezNYoLs3VMIzL0dQE4v//AQ "R – Try It Online") (as primes is not recognised by tio.run, apparently) Here is the output on rrdr.io:
```
prod(primes::nth_prime(seq(a=l<-scan()))^l)
0 0 0 0 1
Read 5 items
[1] 11
prod(primes::nth_prime(seq(a=l<-scan()))^l)
2 3 1 0 0 1
Read 6 items
[1] 7020
prod(primes::nth_prime(seq(a=l<-scan()))^l)
9 0 0 1 0 0 2
Read 7 items
[1] 1035776
```
[Answer]
# [Ruby](https://www.ruby-lang.org/) `-rprime`, ~~54~~ 37 bytes
A whopping 17 bytes off by Sisyphus.
```
->x{c=1;x.zip(Prime){|a,b|c*=b**a};c}
```
[Try it online!](https://tio.run/##3VPLSgNBELz7FQNeNGykp99NiN/gXTyYoJCDGqKCGv1113E2O1n8BGGYnS66q6ur2d3r6r2/X/bzy7f9epkXbxcfm@3Z1W7zcHe@/7ztVp/r2XI1m91@LdZf/TbdX1/DzU06TfPLlE9qnMcYh5i6hCNkBwy6lKewNPjfnGYDsQ3T6WRiMT241SUbQSbjAZUJqhF@gHPhlWYvuxM2lqGrd4nbPtQdOADdj6soCbltTDKKebkAYMiwLsVA1FhYkMIsghUPOrh0KQrHpjJRJURmaIJZ2bQyQ9Pode02PFoDATEIUuYIVUTMAcd5y8FaEBNDw4kofp1BLR8de3DNLPlU27SS7AqYi2FehiEJzQQOTjqZW@vx8T7aCJnZMLBolEJUdIohakZzFQc4jhi12Koj@Y/XXpJFhZwJgykDqAWbCFvZ0MAC/ffT9mXz9Pjcz3fb35/uBw "Ruby – Try It Online")
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 29 bytes
```
(i=s=1;s*=Prime@i++^#&/@#;s)&
```
[Try it online!](https://tio.run/##3VBLCoMwEN17ikBA2ppS4y8JkuIRuhcLUhSzsIvqTjx7OkyY4hkKw/Dmzbz5zf06DXO/ulfvR@tPzi5W1svFPj5uHhqXJE8e3xpeL@fYA/deW369jy3vOqCjbUt3EbFNos8FyxCkgskD/hsLZ1Z0GtyoEJQEJBSVlAsaLVhB3wEsw8OUYCakMSygCHqQpjx00fhLFcBvCFiGlCG9RibHUkMzKjRNPixiMFQ4RtJSu/df "Wolfram Language (Mathematica) – Try It Online")
One character longer than [@att's solution](https://codegolf.stackexchange.com/a/220273/87058) but maybe it has potential for golfing down.
]