text:
Weapons of Math Instruction
Last time when I tried to come up with something easy that wasn't a duplicate, it ended up being way too hard.. So hopefully this time it's indeed something newcomers can try as well.
Input:
An array/list with integers/decimals. (Or a string representing an array with integers/decimals.)
Output:
Loop through the numbers and apply the following five mathematical operands in this order:

Addition (+);
Subtraction (−);
Multiplication (* or × or ·);
Real / Calculator Division (/ or ÷);
Exponentiation (^ or **).

(NOTE: The symbols between parenthesis are just added as clarification. If your programming language uses a completely different symbol for the mathematical operation than the examples, then that is of course completely acceptable.)
Keep continuing until you've reached the end of the list, and then give the result of the sum.
Challenge rules:

Exponentiation by 0 (n ^ 0) should result in 1 (this also applies to 0 ^ 0 = 1).
There are no test cases for division by 0 (n / 0), so you don't have to worry about that edge-case.
If the array contains just a single number, we return that as the result.

General rules:

This is code-golf, so shortest answer in bytes wins.
Don't let code-golf languages discourage you from posting answers with non-codegolfing languages. Try to come up with an as short as possible answer for 'any' programming language.
Standard rules apply for your answer, so you are allowed to use STDIN/STDOUT, functions/method with the proper parameters, full programs. Your call.
Default Loopholes are forbidden.
If possible, please add a link with a test for your code.

Test cases:
[1,2,3,4,5] -> 0
-> 1 + 2 = 3
  -> 3 - 3 = 0
    -> 0 * 4 = 0
      -> 0 / 5 = 0

[5,12,23,2,4,4,2,6,7] -> 539
-> 5 + 12 = 17
  -> 17 - 23 = -6
    -> -6 * 2 = -12
      -> -12 / 4 = -3
        -> -3 ^ 4 = 81
          -> 81 + 2 = 83
            -> 83 - 6 = 77
              -> 77 * 7 -> 539

[-8,50,3,3,-123,4,17,99,13] -> -1055.356...
-> -8 + 50 = 42
  -> 42 - 3 = 39
    -> 39 * 3 = 117
      -> 117 / -123 = -0.9512...
        -> -0.9512... ^ 4 = 0.818...
          -> 0.818... + 17 = 17.818...
            -> 17.818... - 99 -> -81.181...
              -> -81.181... * 13 = -1055.356...

[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2] -> 256
-> 2 + 2 = 4
  -> 4 - 2 = 2
    -> 2 * 2 = 4
      -> 4 / 2 = 2
        -> 2 ^ 2 = 4
          -> 4 + 2 = 6
            -> 6 - 2 = 4
              -> 4 * 2 = 8
                -> 8 / 2 = 4
                  -> 4 ^ 2 = 16
                    -> 16 + 2 = 18
                      -> 18 - 2 = 16
                        -> 16 * 2 = 32
                          -> 32 / 2 = 16
                            -> 16 ^ 2 = 256

[1,0,1,0,1,0] -> 1
-> 1 + 0 = 1
  -> 1 - 1 = 0
    -> 0 * 0 = 0
      -> 0 / 1 = 0
        -> 0 ^ 0 = 1

[-9,-8,-1] -> -16
  -> -9 + -8 = -17
    -> -17 - -1 = -16

[0,-3] -> -3
  -> 0 + -3 = -3

[-99] -> -99

Not integer division?

@LeakyNun No. Perhaps I should change the input to a list with decimals instead of integers due to division (and test case 3)?

Was this in the sandbox?

@Bálint Yes, since Friday morning (CET) (it's deleted now, but those without enough rep can still view it). And I received some good feedback from TimmyD and flawr that has improved the challenge a lot. (PS: Since I get this question every time I post a challenge, should I add a link to the deleted Sandbox & datetime next time?)

No need, just answer this question every time you post a challenge. :)

For clarification, does 0^0 = 1? From the description, it seems so, but you might want to make it explicit just in case.

@Mego Yes, 0^0 = 1. A.f.a.i.k., n ^ 0 is always 1 regardless of n in math (or are there different mathematical rules here, since you aren't the first to ask?). It also has the answer 1 in the 5th test case for 0 ^ 0. But I'll add it at the top as well to clarify it explicitly.

In math, there are two conflicting "rules": n ^ 0 = 1, but 0 ^ n = 0. The conflict is resolved by setting n != 0 for both of the rules, but then it leaves 0 ^ 0 undefined. However, there are a lot of things that fall into place nicely in mathematics if 0 ^ 0 is defined to be 1. See Wikipedia for some details.

If I return infinity instead of a divide by zero error, is thst okay?

@Bálint The rules state that there will never be a valid input with a division by zero. You don't have to worry about that edge case.

@Mego He said there's no testcase for it, but should normally ouput an error

@Bálint The wording could be a bit clearer, but that is the interpretation I and the other posters have been going off of, since that was the suggestion in the Sandbox that led to the rule being added.

@Bálint @Mego is indeed right, you don't have to worry about divide by 0 cases / errors. I've chanegd the wording to clarify it a bit.

* is APL's symbol for exponentiation. Is this acceptable if one of the other two multiplication symbols is used?

@Adám Yes, the symbols were just added as clarification of the mathematical operations in the sense of: pictures (or symbols) say more than thousand words. It's completely fine if your language uses even none of the symbols, as long as they imply and are executed as their counterpart mathematical operation.

Jelly, 13 bytes
“+_×÷*”ṁṖ⁸żFV

Try it online! or verify all test cases.
How it works
“+_×÷*”ṁṖ⁸żFV  Main link. Argument: A (list of integers)

“+_×÷*”        Yield the list of operations as a string.
        Ṗ      Yield A popped, i.e., with its last element removed.
       ṁ       Mold; reshape the string as popped A.
               This repeats the characters of the string until it contains
               length(A)-1 characters.
         ⁸ż    Zipwith; pairs the integers of A with the corresponding characters.
           F   Flatten the result.
            V  Eval the resulting Jelly code.
               Jelly always evaluates left-to-right (with blatant disregard towards
               the order of operations), so this returns the desired result.

Nice, that's 8 lower byte-count than Pyke, which was currently in the lead.

Nobody outgolfs Dennis. Never.

Just a question: does it really count as 13 bytes with all those non-ascii characters?

@XavierDury Yes. The bytes link in the header leads to Jelly's very own code page, which encodes the 256 characters Jelly understands as a single byte each.

@Dennis Thank you for the precision!

Javascript ES7 49 bytes
a=>a.reduce((c,d,e)=>[c**d,c+d,c-d,c*d,c/d][e%5])

Saved 9 bytes thanks to Dom Hastings, saved another 6 thanks to Leaky Nun
Uses the new exponentiation operator.

@LeakyNun won't that just produce Infinity, not an error?

Try using eval it might be shorter

@Upgoat It used eval first, then Leaky Nun showed me, that it is better, to do it like this

@Bálint you, like, using so many, commas?

@EᴀsᴛᴇʀʟʏIʀᴋ Non-native speaker. Bálint often does that. English grammar is silly at the best of times.

@EᴀsᴛᴇʀʟʏIʀᴋ My language puts a comma pretty much everywhere, whether it be the end of a logical block or pretty much before every conjunction. I can't seem to drop this.

Haskell, 76 65 64 62 bytes
Thanks to @Damien for removing another two bytes=)
f(u:v)=foldl(\x(f,y)->f x y)u(zip(v>>[(+),(-),(*),(/),(**)])v)

This uses the >> which here just appends the list [(+),...] to itself length v times. The rest still works still the same as the old versions.
Old versions:
These solutions make use of the infinite lists, as cycle[...] just repeats the given list infinitely. Then it basically gets ziped with the list of numbers, and we just fold (reduce in other languages) the zipped list via a lambda, that applies the operators to the accumulator/current list element.
f(u:v)=foldl(\x(f,y)->f x y)u(zip(cycle[(+),(-),(*),(/),(**)])v)

f(u:v)=foldl(\x(y,f)->f x y)u(zip v(cycle[(+),(-),(*),(/),(**)]))

f l=foldl(\x(y,f)->f x y)(head l)(zip(drop 1l)(cycle[(+),(-),(*),(/),(**)]))

you can replace cycle by: v>>

@Damien Thank you very much!

Hm, foldl(&)u$zipWith(&)v(flip<$>v>>[…])?

@Bergi I honestly cannot read what this is doing anymore=) Anyway, we need an import for &, so that would be longer again, but thanks anyway!

@flawr: Actually my idea was quite the same as what Lazersmoke posted as an answer, I just hadn't read it. I got to it when trying to simplify that lamda of yours with something like uncurry. Didn't work out, but I noticed you should be able to save another byte by using $ instead of parenthesis.

Pyke, 22 21 bytes
lt5L%"+-*/^"L@\RJQ_XE

Try it here!
lt5L%                 -    map(len(input)-1, %5)
     "+-*/^"L@        -   map(^, "+-*/^"[<])
              \RJ     -  "R".join(^)
                    E - pyke_eval(^, V)
                 Q_X  -  splat(reversed(input))

TSQL 116 115 88 bytes
Thanks to Ross Presser suggestion I was able to golf this down to 88 characters
-- In Try-it code, this must be DECLARE @y TABLE
CREATE TABLE T(a real, i int identity)
INSERT T values(5),(12),(23),(2),(4),(4),(2),(6),(7)

DECLARE @ REAL SELECT @=CHOOSE(i%5+1,@/a,ISNULL(POWER(@,a),a),@+a,@-a,@*a)FROM T
PRINT @

Try it online

1 less byte: require the input table to be named T instead of @y. The PL/SQL solution had this, so why not TSQL.

@RossPresser yes of course. how did I miss that. It is not possible in the test link, no permissions to create tables, and it will only run correctly the first time on a database. But what does that matter when a character can be golfed. Thanks for your hint, your improvement has been added

Golfed out another 12 bytes: use CHOOSE instead of nested IIF, leaving one IIF for the i=1 case. With your permission, I will edit the answer.

answer edited. Here's the try-it link -- I'm anonymous so it has no name after it: https://data.stackexchange.com/stackoverflow/query/edit/499612

@RossPresser I didn't know CHOOSE. included your suggestion and golfed it a bit further

Nice!  88 bytes is halfway respectable for a golf! :)

I wonder if, as the number of rows in T increases without limit, the fact that the SELECT doesn't have an ORDER BY clause might bite us. If the optimizer picks a different order then the evaluation will be wrong.

@RossPresser this is not the correct way of doing it. There is an upper limit, but it is pretty high and will not be affected as long as the number of rows is low. Here is an example how to use XML-PATH which is the correct method

I'm interested - why SEDE? :3 I thought it was specifically for Stack Exchange data queries... :P

@user48538 you are right, seeding isn't necessary, I can just change the order of the processing

Haskell, 61 Bytes
foldl(flip id)0.zipWith flip((+):cycle[(+),(-),(*),(/),(**)])

Creates a series of transformations in a list, as in [add 1, add 2, subtract 3, ...], starting with 2 additions because we start with 0 in the fold. Next, we do what I call the List Application Fold, or foldl (flip id), which applies a list of homomorphisms in series. This starts with zero, adds the initial value, then does all of the above computed transformations to get a final result.
Note that (flip id) is the same as (\x y->y x), just shorter.
Sample usage:
f = foldl(flip id)0.zipWith flip((+):cycle[(+),(-),(*),(/),(**)])
f [1,2,3,4,5] -- Is 0.0

Instead of flip id, you could simply use &. Or flip($). Wow, I never realised ($) = id

@Bergi: & is defined in Data.Function, so you need the import, too. Maybe some online interpreter imports it by default, but then you need to specify which one you use.

Pyth, 27 26 25 bytes
.v+>tlQ*lQ"^c*-+":jdQ\-\_

Test suite.
Pyth uses prefix notation: 1+2 is written as +1 2 (space needed to separate numbers).
Therefore, for the first testcase, the expression would be (((1+2)-3)*4)/5, which in prefix notation, would be written as /*-+ 1 2 3 4 5.
In Pyth, float division is c instead of /, so it becomes c*-+ 1 2 3 4 5.
Also, in Pyth, -100 is written as _100 instead.
Therefore, for the third test case, which is ((((((((-8+50)-3)*3)/-123)^4)+17)-99)*13), it becomes: *-+^c*-+ _8 50 3 3 _123 4 17 99 13.
.v+>tlQ*lQ"^c*-+":jdQ\-\_
                  jdQ       Join input by space.
                 :   \-\_   Replace "-" with "_".
   >tlQ*lQ"^c*-+"           Generate the string "...^c*-+" of suitable length.
  +                         Join the two strings above.
.v                          Evaluate as a Pyth expression.

History

33 bytes: v:P+*lQ\(ssV+R\)Q*"+-*/p"lQ\p"**"
27 bytes: .vs+_XUtQUQ"+-*c^"m:+;d\-\_
26 bytes: .vs+_XUtQUQ"+-*c^":jdQ\-\_

You're fast! Seems like I succeeded in making an easier challenge. Or you're just THAT good. ;)

Because it's similar to this.

24 bytes

Actually, 23 bytes
;l"+-*/ⁿ"*@R':j':+'?o+ƒ

Try it online!
Actually uses postfix notation for mathematics, and operators that only ever take two arguments (such as the operators for addition, subtraction, multiplication, division, and exponentiation) do nothing when there is only one element on the stack. Thus, turning the input into Actually code is as simple as reversing the input, formatting it as numerics, and appending the operations. Then, the resultant code can be executed, giving the desired output.
Explanation:
;l"+-*/ⁿ"*@R':j':+'?o+ƒ
;l"+-*/ⁿ"*               repeat the operations a number of times equal to the length of the input
                            (since extraneous operations will be NOPs, there's no harm in overshooting)
          @R             reverse the input
            ':j          join on ":" (make a string, inserting ":" between every pair of elements in the list)
               ':+       prepend a ":" (for the first numeric literal)
                  '?o    append a "?"
                           (this keeps the poor numeric parsing from trying to gobble up the first + as part of the numeric literal, since ? isn't interpreted as part of the literal, and is a NOP)
                     +   append the operations string
                      ƒ  cast as a function and call it

Example of translated code for input 1,2,3,4,5:
:5:4:3:2:1?+-*/ⁿ+-*/ⁿ+-*/ⁿ+-*/ⁿ+-*/ⁿ

Love the way the name of the language merges with the byte count

s/Actually uses postfix notation/Actually actually uses postfix notation/

Julia, 53 50 bytes
!x=(i=0;foldl((a,b)->(+,-,*,/,^)[i=i%5+1](a,b),x))

Try it online!

J, 40 bytes
^~`(%~)`*`(-~)`+/@(|.@,7#:~#&2)(5-5|4+#)

Finds the number of values needed to use a multiple of 5 operators, than pads with the identity values of those operators. In order, + is 0, - is 0, * is 1, % is 1, and ^ is 1, which can be a bit value 00111, or 7 in base 10. Then operates on that list while cycling through operators.
Usage
   f =: ^~`(%~)`*`(-~)`+/@(|.@,7#:~#&2)(5-5|4+#)
   f 1 2 3 4 5
0
   f 5 12 23 2 4 4 2 6 7
539
   f _8 50 3 3 _123 4 17 99 13
_1055.36
   f 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
256
   f 1 0 1 0 1 0
1
   f _9 _8 _1
_16
   f 0 _3
_3
   f _99
_99

Explanation
^~`(%~)`*`(-~)`+/@(|.@,7#:~#&2)(5-5|4+#) Input: A
                                      #  Get length of A
                                    4+   Add four to it
                                  5|     Take it mod 5
                                5-       Find 5 minus its value, call it x
                           #&2           Create x copies of 2
                       7#:~              Convert 7 to base 2 and take the last x digits
                      ,                  Append those x digits to the end of A
                   |.@                   Reverse it, call it A'
^~                                       Power, reversed operators
    %~                                   Division, reversed operators
       *                                 Multiplication
         -~                              Subtraction, reversed operators
            +                            Addition
             /@                          Insert the previous operations, separated by `,
                                         into A' in order and cycle until the end
                                         Then evaluate the equation from right-to-left
                                         and return

Python 2, 81 67 64 bytes
i=10
for n in input():exec'r%s=n'%'*+-*/*'[i::5];i=-~i%5
print r

Input is an array of floats. Test it on Ideone.
How it works
'*+-*/*'[i::5] selects every fifth character of the string, starting with the one at index i, so this yields ** if i = 0, + if i = 1, - if i = 2, * if i = 3 and / if i = 4. Since the string has length 6, the expression will yield an empty string if i > 5.
We initialize the variable i to 10. For each number n in the input array, we construct the string r<op>=n, which exec executes.
Initially, i = 10, so <op> is the empty string, and it initializes r with r+=n. After each step, we increment i modulo 5 with i=-~i%5, so the next step will retrieve the proper operator.
When all input numbers has been processed, and we print r, which holds the desired output.

Matlab - 95 91 85 bytes / Octave - 81 bytes
Input is in such form: a = ['1' '2' '3' '4' '5'];, I hope this is covered by "string representing an array with integers/decimals", else there are 2 num2str needed additionally.
Every intermediate result gets printed to console because that saves me some semicolons. a(1) is executed so its value is then saved to ans. Also of course using ans in code is bad practice.
b='+-*/^'
a(1)
for i=2:length(a)
  ['(',ans,')',b(mod(i-2,5)+1),a(i)]
end
eval(ans)

In Octave, '+-*/^'(mod(i+2,5)+1) also works, which saves another 4 bytes, thanks Adám and Luis Mendo:
a(1)
for i=2:length(a)
  strcat('(',ans,')','+-*/^'(mod(i-2,5)+1),a(i))
end
eval(ans)

Changelog:

Removed spaces where possible
added Octave solution
replaced strcat() with []

Hi, welcome to PPCG! The input is fine like that, since it's still easily distinguishable what the input is. Hmm, I never used Matlab, so maybe I'm saying idiotic things here, but can't b = '+-*/^' be golfed to b='+-*/^' and for i = 2:length(a) to for i=2:length(a) (removing the spaces)? Also, perhaps Tips for golfing in MATLAB might be interesting for you. :)

Is '+-*/^'(mod(i+2,5)+1) valid?

@Adám No, but it probably is in Octave

@Adám: it works in Octave, I added it.

Mathematica, 67 66 65 bytes
Fold[{+##,#-#2,#2#,#/#2,If[#2==0,1,#^#2]}[[i++~Mod~5+1]]&,i=0;#]&

Simple Fold with a variable i holding the index.

A byte can be saved by +## instead of #+#2

CJam, 18 bytes
q~{"+-*/#"W):W=~}*

Input is an array of floats. Try it online!
How it works
q~                  Read and evaluate all input.
  {             }*  Reduce:
   "+-*/#"            Push the string of operators.
          W           Push W (initially -1).
           ):W        Increment and save in W.
              =       Retrieve the character at that index.
               ~      Evaluate.

R, 87 78 70 bytes
i=0
Reduce(function(a,j)get(substr("+-*/^",i<<-i%%5+1,i))(a,j),scan())

Try it online!

at some point I really need to learn how to use do.call...I probably shouldn't consider myself an R programmer until I do!

@Giuseppe Advanced R by Hadley Wickam is a great beach read :)

@Giuseppe thanks for pointing out do.call - made me realize I was looking for get.

Java 8, 173 172 167 138 137 118 113 bytes
a->{double r=a[0],t;for(int i=1;i<a.length;r=new double[]{Math.pow(r,t),r+t,r-t,r*t,r/t}[i++%5])t=a[i];return r;}

Explanation:
Try it here.
a->{                     // Method with double-array parameter and double return-type
  double r=a[0],         //  Result-double, starting at the first item of the input
         t;              //  Temp double
  for(int i=1;           //  Index-integer, starting at the second item
      i<a.length;        //  Loop over the input-array
      r=new double[]{    //    After every iteration, change `r` to:
         Math.pow(r,t),  //      If `i%5` is 0: `r^t`
         r+t,            //      Else-if `i%5` is 1: `r+t`
         r-t,            //      Else-if `i%5` is 2: `r-t`
         r*t,            //      Else-if `i%5` is 3: `r*t`
         r/t}[i++%5])    //      Else-if `i%5` is 4: `r/t`
                         //      And increase `i` by 1 afterwards with `i++`
    t=a[i];              //   Change `t` to the next item in the array
  return r;}             //  Return result-double

Because, ya know, java.1.5 times longer than the current longest answer....wich is in SQL

@Bálint That's Java for ya. :) My shortest java answer so far is 65 bytes xD (and that wasn't really my answer, but Leaky Nun's..)

Well, float is shorter than double.

You can change double r=a[0]; to double r=a[0],b; to save some bytes.

You can change i<a.length;i++ to i++<a.length; (you might have to change the order of the operations)

@LeakyNun Originally I had float, but there isn't a Math.pow for floats, hence the double instead. Thanks for the ,b. And with i++<a.length I get an ArrayOutOfBoundsException at b=a[i]; (unless I do i++<a.length-1 instead, which is one byte longer instead of shorter).

@KevinCruijssen This can be solved by int i=0;++i<a.length;.

You can change == 4 to > 3 and == 0 to < 1.  I'm not sure but I think you could save a bit by creating a variable for i % 5.

I figured you can change the whole thing to a concatenation of ternaries. In all comparisons you can then use the <x trick, shrinking the whole function to 137 characters.

@Frozn Thanks, that saved a lot of bytes! Hmm, I get down to 144 bytes instead of 137. Did I make a mistake?

The last comparison x < 5 isn't necessary, as the value can only be between 0 and 4. The other ternaries ensure that there is only the possibility of x == 4. So it should look like this: [...] x < 4 ? r * s : r / s;. I also used @LeakyNun 's tip, which saves another character.

Haskell - 74
f(x:xs)=foldl(\x(o,y)->o x y)x(zip(cycle[(+),(-),(*),(/),flip(^).floor])xs)

Test cases:
λ> f[1,2,3,4,5] -> 0.0
λ> f[5,12,23,2,4,4,2,6,7] -> 539.0
λ> f[-8,50,3,3,-123,4,17,99,13] -> -1055.356943846277
λ> f [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2] -> 256.0

It could probably be shorter; Haskell's support for infinite lists and higher order functions make the direct solution quite pleasant, though. A version of ^ :: Double -> Double -> Double would be nicer for golfing, but I couldn't find one. Thankfully, I didn't need a full lambda, so pointless style shaved off a few bytes.

You can prepend a single (+) to the list of operators and start the foldl with 0 to go completely pointfree and save the function name and parameters: foldl(\x(o,y)->o x y)0.zip((+):cycle[(+),(-),(*),(/),(**)]).

Oracle PL/SQL, 275 254 Bytes
declare r number;begin for x in (select n,mod(rownum,5)r from t) loop if r is null then r:=x.n;elsif x.r=2then r:=r+x.n;elsif x.r=3then r:=r-x.n;elsif x.r=4then r:=r*x.n;elsif x.r=0then r:=r/x.n;else r:=r**x.n;end if;end loop;DBMS_OUTPUT.PUT_LINE(r);end;

The data must be inserted in a table called T with a column N of type NUMBER
Usage:
drop table t;
create table t (n number);
insert into t values (-8);
insert into t values (50);
insert into t values (3);
insert into t values (3);
insert into t values (-123);
insert into t values (4);
insert into t values (17);
insert into t values (99);
insert into t values (13);

declare r number;begin for x in (select n,mod(rownum,5)r from t) loop if r is null then r:=x.n;elsif x.r=2then r:=r+x.n;elsif x.r=3then r:=r-x.n;elsif x.r=4then r:=r*x.n;elsif x.r=0then r:=r/x.n;else r:=r**x.n;end if;end loop;DBMS_OUTPUT.PUT_LINE(r);end;

Output:
-1055,356943846277162152071601242992595623

275 Bytes version:
declare r number;cursor c is select n,mod(rownum,5) r from t;begin for x in c loop if r is null then r:=x.n;else case x.r when 2 then r:=r+x.n;when 3 then r:=r-x.n;when 4 then r:=r*x.n;when 0 then r:=r/x.n;else r:=r**x.n; end case;end if;end loop;DBMS_OUTPUT.PUT_LINE(r);end;

PowerShell v2+, 124 bytes
param($n)$o=$n[0];if($y=$n.count-1){1..$y|%{$o=if(($x=$i++%5)-4){"$o"+'+-*/'[$x]+$n[$_]|iex}else{[math]::pow($o,$n[$_])}}}$o

Long because PowerShell doesn't have a ^ or ** operator, so we have to account for a separate case and use a .NET call.
Takes input $n as an array, sets our output $o to be the first digit. We then check the .count of the array, and so long as it's greater than one we enter the if. Otherwise, we skip the if.
Inside the if we loop through the array 1..$y|%{...} and each iteration we re-set $o to a new value, the result of another if/else statement. So long as our counter $i++ isn't modulo-5 equal to 4 (i.e., we're not at the ^ operator), we simply take $o and concatenate it with the appropriate symbol '+-*/'[$x] and the next number in the input array $n[$_]. We pipe that to iex (alias for Invoke-Expression and similar to eval), and that gets re-saved to $o. If we're on the ^ operator, we're in the else, so we execute a [math]::Pow() call, and that result gets re-saved back into $o.
In either case, we simply output $o to the pipeline and exit, with output implicit.

Rust, 123, 117 bytes
Original answer:
fn a(v:&[f32])->f32{v.iter().skip(1).enumerate().fold(v[0],|s,(i,&x)|match i%5{0=>s+x,1=>s-x,2=>s*x,3=>s/x,_=>s.powf(x)})}

stupid long method names ^^
ahh much better
fn f(v:&[f32])->f32{v[1..].iter().zip(0..).fold(v[0],|s,(&x,i)|match i%5{0=>s+x,1=>s-x,2=>s*x,3=>s/x,_=>s.powf(x)})}

ungolfed
fn f(values : &[f32]) -> f32 {
    values[1..].iter().zip(0..)
    .fold(values[0], |state,(&x,i)|
        match i%5 {
            0=>state+x,
            1=>state-x,
            2=>state*x,
            3=>state/x,
            _=>state.powf(x)
        }
    )
}

Python 3, 88 93 bytes
f=lambda x:eval('('*(len(x)-1)+'){}'.join(map(str,x)).format(*['+','-','*','/','**']*len(x)))

It started off being much shorter but then operator precedence defeated me and I had to include lots of parenthesis...

Perl 6,  70 68 65  62 bytes
{$/=[(|(&[+],&[-],&[*],&[/],&[**])xx*)];.reduce: {$/.shift.($^a,$^b)}}
{(@_ Z |(&[+],&[-],&[*],&[/],&[**])xx*).flat.reduce: {&^b($^a,$^c)}}
{(@_ Z |(*+*,*-*,&[*],*/*,&[**])xx*).flat.reduce: {&^b($^a,$^c)}}
{reduce {&^b($^a,$^c)},flat @_ Z |(*+*,*-*,&[*],*/*,&[**])xx*}
Explanation:
-> *@_ {
  reduce
    -> $a, &b, $c { b($a,$c) },

    flat       # flatten list produced from zip
      zip
        @_,    # input

        slip(  # causes the list of operators to flatten into the xx list

          # list of 5 infix operators
          &infix:<+>, &infix:<->, &infix:<*>, &infix:</>, &infix:<**>

        ) xx * # repeat the list of operators infinitely
}

Technically * + * is a Whatever lambda, but is effectively the same as &[+] which is short for &infix:<+> the set of subroutines that handle infix numeric addition.
I didn't use that for multiplication or exponentiation as the ways to write them like that is at least as long as what I have (*×* or * * * and * ** *)
Test:
Test it on ideone.com
(after they upgrade to a Rakudo version that isn't from a year and a half before the official release of the Perl 6 spectests)
#! /usr/bin/env perl6

use v6.c;
use Test;

my @tests = (
  [1,2,3,4,5] => 0,
  [5,12,23,2,4,4,2,6,7] => 539,
  [-8,50,3,3,-123,4,17,99,13] => -1055.35694385, # -2982186493/2825761
  [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2] => 256,
  [1,0,1,0,1,0] => 1,
  [-9,-8,-1] => -16,
  [0,-3] => -3,
  [-99] => -99,
);

plan +@tests;

my &code = {reduce {&^b($^a,$^c)},flat @_ Z |(*+*,*-*,&[*],&[/],&[**])xx*}

for @tests -> $_ ( :key(@input), :value($expected) ) {
  is code(@input), $expected, .gist
}

1..8
ok 1 - [1 2 3 4 5] => 0
ok 2 - [5 12 23 2 4 4 2 6 7] => 539
ok 3 - [-8 50 3 3 -123 4 17 99 13] => -1055.35694385
ok 4 - [2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2] => 256
ok 5 - [1 0 1 0 1 0] => 1
ok 6 - [-9 -8 -1] => -16
ok 7 - [0 -3] => -3
ok 8 - [-99] => -99

51 bytes

A few tricks can reduce @Willmore´s approach by 23 to 174 bytes (requires php 5.6 or later). The most saving part is removing unneccessary parentheses (-10 bytes).

 function f($a){while(count($a)>1){$l=array_shift($a);$r=array_shift($a);array_unshift($a,($j=$i++%5)?($j==1?$l-$r:($j==2?$l*$r:($j==3?$l/$r:$l**$r))):$l+$r);}return end($a);}

But using the ** operator instead of pow() also allows to use eval with an array for the operations; and with a few more tricks ...
PHP >= 5.6, 82 bytes
while(--$argc)eval('$x'.['/','**','+','-','*'][$i++?$i%5:2]."=$argv[$i];");echo$x;

takes list from command line parameters. Run with php -nr '<code>' or try it online.
old version, 161 157 151 145 144 140 137 117 bytes
function f($a){while(count($a)>1)eval('$a[0]=array_shift($a)'.['+','-','*','/','**'][$i++%5].'$a[0];');return$a[0];}

The most effective golfing came from writing the intermediate result directly to the first element - after shifting the previous result from the array.
breakdown
function f($a)
{
    while(count($a)>1)  // while array has more than one element ...
        eval('$a[0]='                           // future first element :=
            . 'array_shift($a)'                 // = old first element (removed)
            . ['+','-','*','/','**'][$i++%5]    // (operation)
            .'$a[0];'                           // new first element (after shift)
        );
    return$a[0];        // return last remaining element
}

test suite
$cases = array (
    0=>[1,2,3,4,5],
    539=>[5,12,23,2,4,4,2,6,7],
    '-1055.356...' => [-8,50,3,3,-123,4,17,99,13],
    256 => [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],
    1 => [1,0,1,0,1,0],
    -16 => [-9,-8,-1],
    -3 => [0, -3],
    -99 => [-99]
);
echo '<table border=1><tr><th>values</th><th>expected</th><th>actual result</th></tr>';
foreach ($cases as $expect=>$a)
{
    $result=f($a);
    echo "<tr><td>[", implode(',',$a),"]</td><td>$expect</td><td>$result</td></tr>";
}
echo '</table>';

Nicely done.  You could remove 3 more bytes by returning the last value as an array (change 'return $a[0]' to 'return$a'), which I'm not seeing is specifically against the rules. :)

@gwaugh Imo If the array contains just a single number, we return that as the result. is pretty clear. But thanks for letting me revisit this.

One could make a semantic argument that the "that" in the sentence can refer to "the array".  Regardless, your answer is by far the shortest PHP.  Very nicely done, and thx again for pointers on my longer submission.

PHP, 135 130 bytes
Thanks @titus, -5 bytes, plus 0 case fix!
function f($z){return array_reduce($z,function($c,$x)use(&$i){eval('$c'.['/','**','+','-','*'][$i++?$i%5:5].'=$x;');return$c;});};

Try it online!
Less golfy:
function f( $t ) {
    return array_reduce( $t,
        function( $c, $x ) use( &$i ) {
            eval('$c'.['/','**','+','-','*'][$i++?$i%5:5].'=$x;');
            return $c;
        }
    );
};

Was really rooting for array_reduce() to work for this, but requires too many chars to beat the current lowest PHP score.
Posting it anyway in case anyone has any suggestions!

Nice approach; but I reckon it will fail whenever $c hits 0. Save two bytes with an anonymous function instead of w. eval('$c'.['/','**','+','-','*'][$i++?$i%5:5].'=$x');return$c; is six bytes shorter and should resolve the zero issue.

Thanks @Titus! You are absolutely right about the 0 case. I had to add back the ; after the =$x because eval wouldn't run without it. If I made it an anon function I'd have to have a variable assignment to it or run it within the test code, right? Wouldn't want to call the byte count into question. :D

Brachylog, 68 bytes
hI,?bL,1:+:-:*:/:^b:L:I{bhv?t.|[O:L:I]h$(P,LbM,OhA,Lh:Ir:A&:M:Pr&.}.

That's long… but it uses no evaluation predicate.
Explanation

Main predicate
hI,                                  Unify I with the first element of the input
   ?bL,                              L is the input minus the first element
       1:+:-:*:/:^b                  Construct the list of predicates [+:-:*:/:^]
                   :L:I{...}.        Call predicate 1 with [[+:-:*:/:^]:L:I] as input

Predicate 1
bhv?t.                               If the second element of Input is empty (i.e. L),
                                     unify Output with the last element of Input
|                                    Or
[O:L:I]                              Input = [O:L:I]
       h$(P,                         P is O circularly permutated to the left
            LbM,                     M is L minus the first element
                OhA,                 A is the first element of O
                    Lh:Ir:A&         Call predicate A on [I:First element of L]
                            :M:Pr&.  Call predicate 1 recursively with P:M:

Beat you by 1̶ ̶b̶y̶t̶e̶ 2 bytes ;)

APL (Dyalog Unicode), 29 27 bytesSBCS
Anomymous tacit prefix function. Note that * is exponentiation in APL.
≢{⍎3↓⍕⌽⍵,¨⍨⍺⍴'+-×÷*',¨'⍨'}⊢

Try it online!
Because APL executes right to left, we can just reverse the order of arguments of the inserted operations and reverse the entire expression. Postfix ⍨ reverses arguments. After doing a perfect shuffle of numbers and operations, we only just need to reverse, flatten, and evaluate:
≢{…}⊢ call the following function with count of and actual numbers as ⍺ and ⍵:
 '⍨' this character
 '+-×÷*',¨ prepend each of these characters to that; ["+⍨","-⍨","×⍨","÷⍨","*⍨"]
 ⍺⍴ use the left argument (count of numbers) to cyclically reshape that
 ⌽ reverse
 ⍕ format as flat string
 3↓ drop leading 3 characters (a space and a symbol and ⍨)
 ⍎ execute as APL code

Japt, 16 bytes
r@[XY]r"p+-*/"gZ

Try it online!
Explanation:
r@                  #Reduce the input list:
       "p+-*/"      # The list of functions to apply (offset by one due to the behavior of Z)
              gZ    # Choose the one at the current index, wrapping
  [  ]r             # Apply that function to:
   X                #  The result of the previous step
    Y               #  and the current number
                    #Implicitly return the result of the final step

Ah, feck, was just working on this myself, trying to figure out why it was giving me incorrect results - I'd missed the fecking exponentiation! :\

x86-16 + 8087 FPU, 65 bytes
00000000: 9bdf 04ad 499b de04 ad49 e334 9bde 24ad  ....I....I.4..$.
00000010: 49e3 2d9b de0c ad49 e326 9bde 34ad 49e3  I.-....I.&..4.I.
00000020: 1fad 919b d9e8 85c9 7413 9c7f 02f7 d99b  ........t.......
00000030: d8c9 e2fb 9d7d 069b d9e8 9bd8 f191 e2c5  .....}..........
00000040: c3                                       .

Callable function: input array at DS:SI, length in CX. Output to ST top 8087 register stack.
Listing:
9B DF 04    FILD    WORD PTR [SI]   ; load first item to 8087 stack
AD          LODSW
49          DEC     CX

        CALC:
            ; Add
9B DE 04    FIADD   WORD PTR [SI]   ; add
AD          LODSW                   ; SI = next input
49          DEC     CX              ; decrement counter
E3 34       JCXZ    WOMI_DONE       ; exit if end of input array

            ; Subtract
9B DE 24    FISUB   WORD PTR [SI]   ; subtract
AD          LODSW                   ; SI = next input
49          DEC     CX
E3 2D       JCXZ    WOMI_DONE

            ; Multiply
9B DE 0C    FIMUL   WORD PTR [SI]   ; multiply
AD          LODSW                   ; SI = next input
49          DEC     CX
E3 26       JCXZ    WOMI_DONE

            ; Divide
9B DE 34    FIDIV   WORD PTR [SI]   ; divide
AD          LODSW                   ; SI = next input
49          DEC     CX
E3 1F       JCXZ    WOMI_DONE

            ; Exponent
AD          LODSW                   ; AX = exponent, SI = next input
91          XCHG    AX, CX          ; CX = counter for loop (exponent), save CX
9B D9 E8    FLD1                    ; load 1 into ST
85 C9       TEST    CX, CX          ; is exponent pos, neg or 0?
74 13       JZ      EXP_DONE        ; exit (with value 1) if exponent is 0
9C          PUSHF                   ; save result flags for later
7F 02       JG      EXP_REP         ; if exp > 1 start calculation
F7 D9       NEG     CX              ; make exponent positive for loop
        EXP_REP:
9B D8 C9    FMUL    ST(0), ST(1)    ; multiply ST0 = ST0 * ST1
E2 FB       LOOP    EXP_REP
9D          POPF                    ; restore sign flag from earlier
7D 06       JGE     EXP_DONE        ; if exponent was neg, divide 1 by result
9B D9 E8    FLD1                    ; push 1 into numerator
9B D8 F1    FDIV    ST(0), ST(1)    ; ST0 = 1 / ST1
        EXP_DONE:
91          XCHG    AX, CX          ; restore CX

E2 C5       LOOP    CALC            ; if more input, start again

        WOMI_DONE:
C3          RET

Sample Output:

This is great! I've written a similar solution for x86-64 (linux) but I haven't golfed it much yet which will probably change a lot of the logic around.
For your exponent calculation, even though the tests given don't test receiving a negative exponent, I felt that it was a necessary part of the program logic, especially since it's as simple as pushing 1 to st0 and then doing a div between st0 and st1 (at least on x86 this is two instructions).

Thanks @davey -- very good point!  I've updated the code to handle negative exponents and added another test case for it.

c#, 238, 202 bytes
double d(double[]a){Array.Reverse(a);var s=new Stack<double>(a);int i=0,j;while(s.Count>1){double l=s.Pop(),r=s.Pop();j=i++%5;s.Push(j==0?l+r:j==1?l-r:j==2?l*r:j==3?l/r:Math.Pow(l,r));}return s.Peek();}

I didn't see any c# solution so I will give one. This is my first codegolf. I started writing in c# "two months ago" (though I know Java to some extent).
It uses Stack

Ungolfed and test cases
using System;
using System.Collections.Generic;

class M
{
    double d(double[]a) {
        Array.Reverse(a);
        var s = new Stack<double>(a);
        int i=0,j;
        while (s.Count>1)
        {
            double l=s.Pop(),r=s.Pop();
            j=i++%5;
            s.Push(j==0?l+r:j==1?l-r:j==2?l*r:j==3?l/r:Math.Pow(l, r));
        }
        return s.Peek();
    }

    public static void Main()
    {
        int[][] a = new int[][]{
            new int[]{1,2,3,4,5},
            new int[]{5,12,23,2,4,4,2,6,7},
            new int[]{-8,50,3,3,-123,4,17,99,13},
            new int[]{2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2},
            new int[]{1,0,1,0,1,0},
            new int[]{-9,-8,-1},
            new int[]{0,-3},
            new int[]{-99}
        };

        for (int i = 0; i < a.Length; i++)
        {
            Console.WriteLine(new M().d(Array.ConvertAll(a[i], e => Convert.ToDouble(e))));
        }
        Console.ReadKey();
    }
}

Output:
0
539
-1055,35694384628
256
1
-16
-3
-99

Hi, and welcome to PPCG! This might be a nice topic to look at: Tips for code-golfing in C#. Some things that can be golfed down in your code: spaces (a, Double.Parse -> a,Double.Parse; while (s.Count -> while(s.Count; Pow(l, r) -> Pow(l,r)). Also, you can remove int  in front of the j= and put it behind the int i=0,j;. Great first answer though, and once again welcome. :)

@KevinCruijssen Hi! Ty!  Spaces removed and j moved as you suggested :)

PHP, 206,198,197 bytes
function f($a){while(count($a)>1){$l=array_shift($a);$r=array_shift($a);array_unshift($a,($j=$i++%5)==0?($l+$r):($j==1?($l-$r):($j==2?($l*$r):($j==3?($l/$r):(pow($l,$r))))));}return array_pop($a);}

Ungolfed
<?php

function f($a)
{
    while(count($a)>1)
    {
        $l = array_shift($a); $r = array_shift($a);
        array_unshift($a,($j=$i++%5)==0?($l+$r):($j==1?($l-$r):($j==2?($l*$r):($j==3?($l/$r):(pow($l,$r))))));
    }
    return array_pop($a);
}

echo f([1,2,3,4,5])."\n";
echo f([5,12,23,2,4,4,2,6,7])."\n";
echo f([-8,50,3,3,-123,4,17,99,13])."\n";
echo f([2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2])."\n";
echo f([1,0,1,0,1,0])."\n";
echo f([-9,-8,-1])."\n";
echo f([0,-3])."\n";
echo f([-99])."\n";

In PHP, logic similar to my c# answer (202 bytes) :) .

Emacs Lisp, 127 bytes
(lambda(x)(let((f'(+ - * / expt))(a(float(car x)))(x(cdr x)))(dotimes(i(length x)a)(set'a(funcall(nth(mod i 5)f)a(nth i x))))))

Ungolfed:
(lambda(x)
  (let ((f'(+ - * / expt))  ; list of functions in order they are called
        (a (float (car x))) ; initial value
        (x (cdr x)))        ;
    (dotimes (i (length x) a)
      (set 'a (funcall (nth (mod i 5) f) ; call the i % 5th function
                       a                 ; with accumulator
                       (nth i x))))))    ; and the ith value

Testcases:
(-map
  (lambda(x)(let((f'(+ - * / expt))(a(float(car x)))(x(cdr x)))(dotimes(i(length x)a)(set'a(funcall(nth(mod i 5)f)a(nth i x))))))
  '((1 2 3 4 5)
    (5 12 23 2 4 4 2 6 7)
    (-8 50 3 3 -123 4 17 99 13)
    (2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2)
    (1 0 1 0 1 0)
    (-9 -8 -1)
    (0 -3)
    (-99)))

Output:
(0.0 539.0 -1055.356943846277 256.0 1.0 -16.0 -3.0 -99.0)

Ruby, 57 bytes
->a{i=0;a.reduce{|x,y|x.send %w[** + - * /][(i+=1)%5],y}}

Try it online!
Takes an array of floats, but also works with integers, as long as all division results are integer.
At first, I tried fiddling with eval which looks like the obvious approach, but it gets rather verbose. Instead, I opted for send, which is basically Ruby's way to call methods by names, so that x.send("+",y) is equivalent to x+y.

shell script, 157 135 133 130 124 99 95 88 85 81 bytes
golfed (bash/non-posix) - 81 bytes
f()(A=$1;S=+-*/^;shift;for B;{ C=${S:((I++%5)):1};A=`bc -l<<<$A$C$B`;};echo $A)

golfed (portable/posix, using 'cut'-operator) - 118 bytes
f()(S=+-x/^;A=$1;shift;for B;do C=`echo $S|cut -b1`;S=`echo $S|cut -b2-5`;S="$S$C";A=`echo $A$C$B|bc -l`;done;echo $A)

golfed (portable/posix, with builtins) - 124 bytes
f()(A=$1;shift;for B;do case $I in 1)C=-;;2)C=*;;3)C=/;;4)C=^;;*)C=+;I=;;esac;I=$((I+1));A=`echo $A$C$B|bc -l`;done;echo $A)

ungolfed (posix - with builtins):
A=$1
shift
for B;do
case $I in
1)C=-;;
2)C=*;;
3)C=/;;
4)C=^;;
*)C=+;I=
esac
I=$((I+1))
A=`echo $A$C$B|bc -l`
done
echo $A

ungolfed (posix - with 'cut'):
S=+-x/^
A=$1
shift
for B;do
C=`echo $S|cut -b1`
S=`echo $S|cut -b2-5`
S="$S$C"
A=`echo $A$C$B|bc -l`
done
echo $A

This is unfair!
We don't have real division in language 'sh',
so we must use 'bc' which is...lame 8-)
hint: your directory must have no files, otherwise the asterisk expands to filenames (◔_◔)
Tests:
# f 1 2 3 4 5
0
# f 5 12 23 2 4 4 2 6 7
539
# f -8 50 3 3 -123 4 17 99 13
-1055.35
# f 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
256.00
# f 1 0 1 0 1 0
1
# f -9 -8 -1
-16
# f 0 -3
-3
# f -99
-99

05AB1E, 29 28 27 bytes
Using 'Python eval' builtin (29 28 27 bytes):
g'(×svy')"+-*/"S„**ªNè}\J.E

Try it online or verify all test cases. (NOTE: ª is ¸« and we use the legacy version in the TIO, because .E is disabled in the new version of 05AB1E on TIO.)
Using 'Execute as 05AB1E' builtin (29 28 bytes):
vyD0‹i¦'(}N_iðë"m+-*/"Nè]J.V

Try it online or verify all test cases.
Explanation:
In Python ** is used for exponentiation. In addition, *,/,** have operator precedence over +,-. So the code transforms [-1,2,-3,4,-5] to (((((-1)+2)--3)*4)**-5), and then uses .E to execute the string as Python eval.
g                  # Take the length of the (implicit) input
 '(×              '# Create a string of "(" characters of that size
s                  # Swap so the (implicit) input is at the top of the stack again
 v            }    # Loop `y` of each of its items:
  y                #  Push `y`
   ')             '#  Push ")"
     "+-*/"S       #  Push ["+","-","*","/"]
            „**ª   #  Append a trailing "**": ["+","-","*","/","**"]
                Nè #  Get a string from this list based on the index of the loop
                   #  (with automatic wraparound)
\                  # Discard the trailing operand from the stack
 J                 # Join all strings on the stack together
  .E               # Execute as Python eval (and output implicitly)

In 05AB1E negative values are with a trailing ( instead of leading -, and m is used for exponentiation. In addition, a Polish notation is used. So the program transforms [-1,2,-3,4,-5] to 1( 2+3-4*5(m, and then uses .V to execute the string as 05AB1E code.
v                  # Loop `y` of each of its items:
 y                 #  Push `y`
  D0‹i   }         #  If `y` is negative:
      ¦            #   Remove the first character (the minus sign)
       '(         '#   And push a "("
  N_i              #  If the index of the loop is 0:
     ð             #   Push a space character
    ë              #  Else:
     "m+-*/"Nè     #   Push a character from "m+-*/" based on the index of the loop
                   #   (with automatic wraparound)
]                  # Close both the if-else and loop
 J                 # Join all strings on the stack together
  .V               # Execute as 05AB1E code (and output implicitly)

Runic Enchantments, 64 bytes
R31B~~?@+31B~~?@S-31B~~?@*31B~~?@S,31B~~?@Sp
\i<{1[lil1-{S{)]{{B

Try it online!
First line is the main program loop, which reads a number from input and performs the next math instruction. If no input, the attack is dumped to the output and the program terminates. Entry point is the < on the second line, which reads the first number from input prior to entering the main loop. Invalid input blindly accepted with unpredictable results (only + and * are defined for strings, other operations would result in an empty stack).
Woo, finally found a use for Branch command! The second line starting at index 3 acts like a function. In this case it takes in input, checks that it got input, and arranges the stack for return. Then 31B~~ invokes and cleans up after the invokation (as the Branch instruction leaves 2 values on top of the stack, add a return pointer). All told the overhead (8+5n) was less than in-line (9n). I think I'll be adding a modifier that cause B to not push those 2 values (overhead of 2 bytes to save 2n bytes). Happily, no directional commands are needed to insure consistent execution.
Also featured is the [ and ] stack-of-stacks commands, which lets the program temporarily remove the return location from the stack as it handles reading input. It saves several bytes worth of stack manipulation having to otherwise work around those 2 values. These do enforce a maximum input list of 9 values. Changing the entry to y<< increases that to 19 items (and as < acts like a NOP, the branch pointer doesn't need to update). A third line with \y<< (changing the existing \ to U) would double that again to 39 items.
Stack at the end of the Branch "function" would look like [v,i,1,x,y] where x,y are at the top and the 0-indexed location on the first line (y will always be 0) where the next instruction with execute. v is the value that started on the stack prior to entry into the Branch "function". And i is the value read from input. If no input was available, [i,1] would instead be [0] resulting in v being printed when ?@ is reached.

x86-64 machine code (Linux), 90 bytes
0000000000000000 <weapons_asm>:
   0:   48 89 f1                mov    %rsi,%rcx
   3:   db 07                   fildl  (%rdi)

0000000000000005 <math_loop>:
   5:   48 83 c7 04             add    $0x4,%rdi
   9:   48 ff c9                dec    %rcx
   c:   e3 49                   jrcxz  57 <done>
   e:   da 07                   fiaddl (%rdi)
  10:   48 83 c7 04             add    $0x4,%rdi
  14:   48 ff c9                dec    %rcx
  17:   e3 3e                   jrcxz  57 <done>
  19:   da 27                   fisubl (%rdi)
  1b:   48 83 c7 04             add    $0x4,%rdi
  1f:   48 ff c9                dec    %rcx
  22:   e3 33                   jrcxz  57 <done>
  24:   da 0f                   fimull (%rdi)
  26:   48 83 c7 04             add    $0x4,%rdi
  2a:   48 ff c9                dec    %rcx
  2d:   e3 28                   jrcxz  57 <done>
  2f:   da 37                   fidivl (%rdi)
  31:   48 83 c7 04             add    $0x4,%rdi
  35:   48 ff c9                dec    %rcx
  38:   e3 1d                   jrcxz  57 <done>

000000000000003a <exp_rept>:
  3a:   51                      push   %rcx
  3b:   8b 0f                   mov    (%rdi),%ecx
  3d:   d9 e8                   fld1
  3f:   83 f9 00                cmp    $0x0,%ecx
  42:   74 10                   je     54 <exp_rept.done>
  44:   9c                      pushfq
  45:   7f 02                   jg     49 <exp_rept.l>
  47:   f7 d9                   neg    %ecx

0000000000000049 <exp_rept.l>:
  49:   d8 c9                   fmul   %st(1),%st
  4b:   e2 fc                   loop   49 <exp_rept.l>
  4d:   9d                      popfq
  4e:   7d 04                   jge    54 <exp_rept.done>
  50:   d9 e8                   fld1
  52:   de f9                   fdivrp %st,%st(1)

0000000000000054 <exp_rept.done>:
  54:   59                      pop    %rcx
  55:   eb ae                   jmp    5 <math_loop>

0000000000000057 <done>:
  57:   dd 1a                   fstpl  (%rdx)
  59:   c3

Firstly, credit to gwaugh's answer which is also submitted for this post. I started working on this solution before gwaugh posted, which can be seen in my git repo's log, but ultimately his approach to this problem was the most efficient (especially the exponentiation). If you feel inclined to upvote my submission, please check out his as well.
Like my other x86 solutions, this code is simply a function that's meant to be called from a C/C++ program, which can be seen at my git repo. This means that the input array, length, and return pointer are passed through rdi, rsi, and rdx. For x86-64, getting the output location as an argument saves bytes, because normally when a C/C++ function returns a double on this processor, it's passed back through xmm0. This means the result double has to be moved from the FPU stack to a place in memory, then moved into xmm0. If we specify a place in memory we want the result, then we can just move the result double directly from the FPU stack to the memory location.
Exponentiation is done through repeated multiplication, with the assumption that we'll only get integer exponents (though the exponent can be negative). If the problem requires handling floating point exponentiation, the solution becomes extremely complicated. The standard way to compute x^y on x86 is to compute 2^(y * log2(x)). However, if x is negative (which happens in test case 2), log2(x) is a complex number, which can't be directly handled by the FPU. If you're curious how pow(double x, double y) is solved in C, check out the glibc code here (hint: it's complicated).

05AB1E, 15 bytes
ćsvy"+-*/m"Nè.V

Try it online!
or as a Test Suite
Explanation
ć                # extract the head of the input list
 sv              # for each (value y, index N) in the rest of the list
   y             # push the element
    "+-*/m"Nè    # push a string representation of the Nth operator (wraps around)
             .V  # execute it as code

C# (.NET Core), 130 bytes
Without LINQ.

s=>{var x=s[0];for(var j=1;j<s.Length;j++){int t=j%5;var z=s[j];x=t<1?x=Math.Pow(x,z):t<2?x+=z:t<3?x-=z:t<4?x*=z:x/=z;}return x;};

Try it online!

84 - use the interpreter because it imports LINQ (among other commonly used core libraries) for free

K (ngn/k), 42 bytes
{*x{?[x;0 2;y/]}/(#1_x)#(+;-;*;%;{*/y#x})}

Try it online!
Sets up a reduce with the original input as x, and a corresponding list of operations to apply.

(+;-;*;%;{*/y#x}) initialize a list of the desired operations to apply, using {*/y#x} for pow (only works for raising values to integer powers)
(#1_x)#... "overtake" this list, expanding it to match the length of the input x minus one (as the operations are applied between elements of x)
x{...}/... set up the reduce, seeded with the original input and run over the list of operations to apply

?[x;0 2;y/] use ?[x;i;f] splice to apply the operation between the first two elements of the input, replacing those values with the result of applying the operation (y) between them

C (gcc), 135 bytes
#include<math.h>
float r(float*a,int l){float z,v=*a;for(int p=1;p<l;v=(float[]){z?pow(v,z):1,v+z,v-z,v*z,v/z}[p++%5])z=a[p];return v;}

Try it online!

110 bytes


text:
Send a cosmic call
The cosmic call is a message sent into space in 1999 and 2003.
It's made of 23 127*127px monochrome bitmap images, as detailed here.
Your mission is to write a program that displays the entire 127*2921px message, either as a text (made of zeros, ones and line breaks) or as an image (drawn on screen or saved on disk). There will be two categories of winners: one for text output and one for image output.
All the tricks are permitted, except common loopholes.
It is allowed to output the 23 pages separately.
It is allowed to write up to 23 programs (like, one for each page) and sum their size to determine your score.
It is allowed to use up to 23 binary files alongside your program(s). Their weight is counted in your score.
The shortest code (in byte) wins.
At 1 bit per pixel, the image contains 127*127*23/8 = 46370 bytes + 7 bits of data. (warning: it's not allowed to output an extra zero if you store pixel values into 46371 bytes)
Trailing newline/space is allowed for the text output.
Visual output can not contain any black pixel besides the black pixels of the cosmic call. It can be drawn in one column (ordered correctly), or split in 23 images, or animated (like a gif), also ordered correctly.
Attachment: the text output, and the image output to reproduce:

“It is allowed to write many programs (like, one for each page) and sum their size to determine your score.” This is dangerous: the empty Jelly program prints 0, the empty Snails program prints 1, and the empty GolfScript program prints a newline. Someone might submit a 0-byte, 373888-program answer :)

Haha, okay, so I'll limit the number of programs to 23.

Are trailing newlines / spaces permitted?

yep . . . . . .

Can we use another file or do we have to work solely on the source file ? Eg. can I use IO to store a compressed version and then decompress it or does everything need to be a literal in the code.

you can count external files size in your score :)

GIF, 27386 bytes
Here are the pages of the original transmission sliced into individual GIF frames, it turned out not to be as small as 1 PNG of all of them :(

Hello, and welcome to PPCG! While this is not going to win, it is still a good post.

Did you dither? May be able to save 300bytes or so if you use additive transparencies on the transitions.

HTML, 16012b
I compressed the image in PNG8, opened it in a text editor, appended
<svg onload="document.body.innerHTML=''">
at the end, and voilà:
Demo: http://xem.github.io/miniCosmicCall/

NB: appending just  works too but it lets a lot of garbage visible, so I prefer not to.

PS: for the fun, I also put the entire message in a single, executable tweet (you can copy-paste it in a browser console and the image appears):
https://twitter.com/MaximeEuziere/status/742440423994580992

shortest answer+1

didn't say my last word yet!

I'm certain I can't understand what you intended to say here.

sorry, I meant I'm trying to make something even smaller

Python 2.7 - 10971 8077 bytes
update:

LZMA actually for some reason doesn't work for me, so I went back to Deflate.
I found an online tool to compress the PNG even further (they say they use lossy compression, but the array remains unchanged)
I golfed the __main__.py script a bit more...
I found I was omitting a step (extracting the data files from zip archive)
Added DL link (see bottom)

Most compression algorithms look at data as a 1 dimensional array, and therefore cannot capture the repeating 2 dimensional characters displayed in the cosmic call (IMO also makes it harder for aliens to understand too :P).
First, I selected each character as a 7*5 array and made a list of all unique characters (101 if I recall). Then I iterated over the image, and when a character was found, the position and index of that character (in the character list) were recorded.
Those positions could be represented with a single int, however with over 2K  chars found, and positions ranging from 0-370966 (divmod form) require up to 3 bytes each. I collected the character positions in order however, so I instead converted absolute position to offset position, making most of the numbers less than 1 byte. I encoded this list in utf-8 to account for the few numbers that were greater than 1 byte
After recording and removing all the matched characters, I saved the png with maximum compression. I then packaged the python reconstruction script (reverse same process), the png, the chatacter template, and the character position list all into a zip file to take advantage of the fact that python can take a folder or zip file as an argument, and it will begin execution at any file in the top level named __main__.py. I played around with 7z a bit to get the best compression, which turned out to be LZMA with a 1M dict and 32bit words.
here's the decoder script (golfed but with comments still)
import sys,zipfile as z
z.ZipFile(sys.argv[0]).extractall() #extract data files from zip to cwd
from numpy import*
o=open  #next line overwrites open, which I need
from PIL.Image import*
from scipy.ndimage import*
a=imread('p')[:,:,0]/255 #read image file
a[:2414,0]=0 #draw vertical borders
a[2541:,0]=0
a[2412:,-1]=0
a[:2287,-1]=0
for x in range(0,2921,127):a[[x,x+126],:]=0 #draw horizontal borders
with o('c','rb') as f:t=f.read();C=[int(i)for c in t for i in'{0:08b}'.format(ord(c))] #read character template file and convert to list of bytes
C=array(C[:-1]).reshape([101,7,5]) #re-slice (extra 0 appended to make even number of bytes) and re-shape
with o('l','rb') as f:L=array([ord(x)for x in f.read().decode('utf_8')]).reshape([2158,2]) #read decode and reshape positional list
p=0 #relative position accumulator
for e in L:p+=e[0];x,y=p%127,p/127;a[y:y+7,x:x+5]=C[e[1]] #divmod for x,y position and paste character template onto array at position
i=fromarray(a*255)
i.show()

link to download for the zip file...

I am :) (and congrats for this score!)

@xem ...shortly after posting, I continued to mess with it, and it's broken rn (python giving me some sort of zlib error on load) also it's on my work computer. I'll put it up monday tho if I can revert it to a working state. :P

I feel like It could be possible to optimize a balance between the png compression and which characters I encode (lesser used ones) to save a few more bytes..

@xem I added a dl link...

Love the 2D compression idea... What about 3D compression? (Stacking the images)

@NonlinearFruit That sounds like a very interesting idea, however the characters would have to line up in similar xy positions in order to match multiple times. For this challenge, I don't think that approach would make the file any smaller, but it could possibly be beneficial in some very specific applications.

Gzip bzip2 in the shell, 20914 18965 bytes
Make the output data file with the text output provided in the question, bzip2 it and rename the file to s.  This then allows:
bzcat s

to do the job.  So it adds up to 18958 bytes of data and a 7 byte command.

I think you can save a couple of k using ’bzip2’ instead!

@DomHastings: I finally followed your advice.

For further research: Bubblegum and zopfli.

Bash + WebP binary, 11 + 15330 = 15341 bytes
As the rules state this:

Your mission is to write a program that displays the entire 127*2921px
message … or as an image (drawn on screen or saved on disk).
It is allowed to use up to 23 binary files alongside your program(s). Their weight is counted in your score.

and

All the tricks are permitted, except common loopholes.

…I could not resist to post something stupidly simple.
The program is in bash and it outputs the image by saving it on disk.
It uses 1 binary file, which also happens to be image file (yeah WebP is an image format), therefore the program can do as little as… make a copy of that file.
So, the code (11 bytes):
cp b a.webp

Assuming the companion binary is named "b", the code writes the image file to disk with correct extension ("a.webp").
I see little reason to upload the binary, because it's trivially created by running
cwebp -z 9 <downloaded input file> b

it produces the file with 15330 bytes.
If anyone wants, I can upload it somewhere.
NB: -z option in cwebp activates lossless compression mode. 9 is the compression strength (max).

OP author likes this

Pyth, 46381 bytes
For obvious reasons it cannot be posted here.
jc.BC"<too long>"127

Sample.
Pastebin of hexdump of program.

you encode the bits 7 by 7 in latin-1 chars, right? Simple and nice! :) Of course, I'm looking for much better compression :p

Yes, I'm making a better compression. I encoded them 8 by 8, by the way.

By the way, I wonder how you got this score: 12712723/8 = about 46371 bytes. Where did the 355 other bytes go?

Thanks, it exactly matches it now. You can actually see the extra 10 bytes in the code above (jc.BC""127").

How do you deal with the extra bit? (the entire message takes 46370 bytes + 7 bits. Your last byte may produce an extra zero, which is not a valid output)

I prepend a zero at the beginning. It gets disregarded by the .B.

then it's perfect :) thanks for the explanation

If you compress your hexdump using LZW and then decompress it in your program you can save roughly 100096 bytes.

You mean my source code instead of my hexdump? The program cannot read the hexdump directly. Of course the hexdump can be compressed: they are only made up of 17 characters.

Python 3, 64513 bytes
Use only ASCII !
http://pastebin.com/PMLb4Xti
Old version, 64529 bytes:
http://pastebin.com/nteYkUtM

import lzma,base64,os

@EʀɪᴋᴛʜᴇGᴏʟғᴇʀ Thank you !

@Mego I don't think that's necessary, given that it's ridiculously long. Let the comment votes decide.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Denominator of harmonic series
Earlier, we did the pseudofactorial of a number, which is the LCM of the numbers from 1 to n.
It would be useful in adding fractions together.
However, we find that the denominator of 1/1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 is 20 instead of the pseudofactorial of 6, which is 60.
Your task is to find the denominator of 1/1 + 1/2 + ... + 1/n given positive integer n.
Testcases
 n result
 1 1
 2 2
 3 6
 4 12
 5 60
 6 20
 7 140
 8 280
 9 2520
10 2520
11 27720
12 27720
13 360360
14 360360
15 360360
16 720720
17 12252240
18 4084080
19 77597520
20 15519504
21 5173168
22 5173168
23 118982864
24 356948592
25 8923714800
26 8923714800
27 80313433200
28 80313433200
29 2329089562800
30 2329089562800

List for n from 1 to 200.
List for n from 1 to 1000.
List for n from 1 to 10000.

References

Obligatory OEIS A002805 (thanks to @FryAmTheEggman)

Leaderboard

var QUESTION_ID=82815,OVERRIDE_USER=48934;function answersUrl(e){return"http://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"http://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

How big of an input does it have to work for?

@BradGilbertb2gills As big as is reasonable.

M, 9 6 bytes
Thanks to FryAmTheEggman for saving 3 bytes! Code:
RİSg¹İ

M has a huge advantage here, because it works with fractions rather than floats. Explanation:
R       # Get the list [1 ... n].
 İ      # Inverse each, resulting into [1/1, 1/2, 1/3, ..., 1/n].
  S     # Sum it up. (86021/27720 for n=12)
   g¹   # Compute the greatest common denominator with n. (1/27720 for n=12)
     İ  # Calculate the inverse again. (27720 for n=12)

Uses the Jelly encoding. Try it online!.

Also, there is a 4-byte solution, which outputs a leading zero sometimes (e.g. 280 -> 0280). I'm not sure if this is allowed or not:
RİSV

Try it online!.

The explanation of the 6-byte code isn't quite correct. g¹ computes the gratest common divisor of the fraction and n. Using g1 would probably be clearer. 2. V casts the fraction to a string and evaulates it niladically. <num>/ is (non-cumulative) reduce by a niladic operator. This is nonsense, but since there's only one number (the implicit argument 0), it simply does nothing. The next link, the denominator, is niladic, so the previous return value is printed implicitly and replaced with that nilad.

@Dennis Thanks! Fixed the explanation.

@Adnan Is there any documentation for M?

@Challenger5 Not that I know of. It is actually a variant of Jelly, but with arbitrary precision fractions. The Jelly documentation can be used, but be awate that a lot of features implemented in Jelly aren't implemented in M.

Julia, 22 bytes
An anonymous function.
n->1.//(1:n)|>sum|>den

Same length: n->sum(inv,1//1:n).den

Ruby, 57 47 bytes
->n{(1..n).reduce{|a,i|a+1.to_r/i}.denominator}

Thanks to Kevin Lau for shortening this by ten bytes.

Assign a variable to 1.to_r so you don't need to do string injection and conversion. Also, since Ruby's default for reduce is to use the first element as the initial, and 1/1=1, you don't need to specifically set 0 as the initial value.

In modern Ruby 1.to_r can be 1r

Mathematica, 27 bytes
An anonymous function.
Denominator@*HarmonicNumber

For example:
 In[1] := (Denominator@*HarmonicNumber)[10]
 Out[1] = 2520

You could find a 26-byte solution if you dig into the chat :)

Oh! I should let Martin post that one, if he likes. This one is adorably literal, so I’ll keep it.

Would you exemplify how the code is used?

Python 2, 69 67 bytes
a=b=k=r=1
exec'a=a*k+b;b*=k;k+=1;'*input()
while r*a%b:r+=1
print r

Test it on Ideone.
How it works
Let H(n) be the sum of the multiplicative inverses of the first n positive integers. At all times, we have that a / b = 1 + H(k - 1). In fact, a, b, and k are all initialized to 1, and 1 / 1 = 1 = 1 + H(0).
We repeat the code snippet
a=a*k+b;b*=k;k+=1;

(as a string) n (input) times and execute the result. In each step, we update a, b, and k using the identity a / b + 1 / k = ak / bk + b / bk = (ak + b) / bk.
After all copies have been executed, a / b = 1 + H(n), which has the same denominator as H(n).
The fully reduced form of a / b is (a ÷ gcd(a,b)) / (b ÷ gcd(a,b)). Instead of calculating the greatest common divisor, we initialize r as 1 and keep incrementing r until ra is a multiple of b.
Clearly, this makes ra the least common multiple of a and b. Since gcd(a,b) · lcm(a,b) = ab, we have that b ÷ gcd(a,b) = lcm(a,b) ÷ a = ra ÷ a = r, making r the desired output.

Haskell, 52
Import Data.Ratio
f n=denominator$sum[1%k|k<-[1..n]]

If the file is loaded into GHCI, f can be used as a function.

Presumbably you mean import lowercase? It saves a byte to use a map instead of a comprehension: sum$map(1%)[1..n]

MATL, 14 13 bytes
:p:G:!/s1\&X<

Try it online!
Explanation
For input N, the output is upper-bounded by N! (factorial of N). The code computes n/k for n = 1, ..., N! and for k = 1, ..., N. Then it sums over k, which gives the harmonic number multiplied by each n. The desired result is the index n of the first of those values that is an integer.

Jelly, 9 bytes
!©÷RSg®®÷

Try it here.
             Argument: n
! ÷R         Compute [n!÷1, n!÷2, … n!÷n].
 ©             (And store n! in the register.)
    S        Find the sum of this list.
     g®      GCD with n!.
       ®÷    Divide n! by this GCD.

I believe it is possible to achieve the same bytecount without that register.

05AB1E, 8 bytes
Code:
!Ð¹L/O¿/

Explanation:
!         # Take the factorial of the input.
 Ð        # Triplicate this.
  ¹L      # Get the list [1 ... input].
    /O    # Divide and sum up.
      ¿   # Get the GCD of the sum and the factorial.
       /  # Divide the factorial by this.

There might be some accuracy problems for n > 19 due to Python's division... Uses the CP-1252 encoding.
Try it online!.

Mathematica, 26 bytes
Denominator@Tr[1/Range@#]&

An unnamed function taking n as input and returning the denominator. Uses the standard trick of abusing Tr (trace) to sum the list of reciprocals.

Husk, 6 bytes
is\ṁ\ḣ

Try it online!
Not too hard in Husk since it can do math with rational numbers. The hard part was extracting the denominator, I ended up inverting the fraction, converting it to string, and getting the first number from that string.
Explanation
is\ṁ\ḣ
     ḣ     range [1..n]
   ṁ       sum the result of this function for each number:
    \        inverse
  \        invert
 s         convert to string
i          get the first number in the string (the numerator)

JavaScript (ES6), 88 bytes
m=>{for(d=1,i=0;i<m;d*=++i);for(n=i=0;i<m;n+=d/++i);for(g=d;g;[g,n]=[n%g,g]);return d/n}

Only works up to m=20 because of the limits of JavaScript's numeric precision.

Pari/GP, 30 bytes
n->denominator(sum(i=1,n,1/i))

Try it online!

Stax, 5 bytes
┬ΓΣ╞]

Run and debug it
6 bytes without packing.

Whispers v3, 79 bytes
> Input
>> 1!
>> 2∕R
>> (1]
>> Each 3 4
>> ∑5
>> 6⊓2
>> 2∕7
>> Output 8

Try it online!
Same idea as Lynn's Jelly answer.

Thunno, \$ 12 \log_{256}(96) \approx \$ 10 bytes
(Actually 9.88 bytes but that doesn't show up on the leaderboard)
Fztz!R+/SAG/

Attempt This Online!
Port of Adnan's 05AB1E answer.
Explanation
Fztz!R+/SAG/  # Implicit input
Fzt           # Get factorial and triplicate
   z!R+       # Push range(1, input+1)
       /S     # Divide and sum
         AG/  # Get GCD and divide

Python 3,  153 150 146 142 bytes
I'm sure this can golfed further. But I'm new here
f=lambda x:0**x or x*f(x-1)
z=int(input());i=f(z)
r=sum(i/y for y in range(1,z+1))
p=lambda a,b:a if b<1else not a%b+b or p(b,a%b)
print(i/p(r,i))

Welcome to PPCG!

J, 20 bytes
(!%!+.[:+/!%1+i.)@x:

Based on the approach used by @Lynn's solution.
If precision is not necessary for large values of n or if we can assume n will be passed as an extended integer, suffixed by x, a shorter solution can be used for 15 bytes.
!%!+.[:+/!%1+i.

Usage
   f =: (!%!+.[:+/!%1+i.)@x:
   f 30
2329089562800
   (,:f"0) >: i. 15
1 2 3  4  5  6   7   8    9   10    11    12     13     14     15
1 2 6 12 60 20 140 280 2520 2520 27720 27720 360360 360360 360360

Explanation
(!%!+.[:+/!%1+i.)@x:  Input: n
                  x:  Convert n into an extended integer
              i.      Creates the range [0, 1, ..., n-1]
            1+        Add one to each, range is now [1, 2, ..., n]
          !           Get factorial of n
           %          Divide n! by each value in the range [1, 2, ..., n]
      [:+/            Sum those values
   !                  Get n!
    +.                Get gcd between n! and the sum
 !                    Get n!
  %                   Divide n! by the gcd and return

Perl 6,  36  32 bytes
{([+] 1.FatRat X/1..$_).denominator}
{([+] 1.FatRat X/1..$_).nude[1]}
Explanation:
{
  (
    [+]        # reduce with &infix:<+>

      # the following produces a Seq of Rational numbers
      # 1/1, 1/2, 1/3 ... 1/n

      1.FatRat # FatRat.new: 1,1
      X/       # crossed using &infix:</>
      1 .. $_  # Range from 1 to the input inclusive

  ) # resulting in a FatRat

  .nude # (nu)merator (de)nominator
  .[1]  # grab the denominator
}

Test:
my &hd = {([+] 1.FatRat X/1..$_).nude[1]}

say (1..10)».&hd; # (1 2 6 12 60 20 140 280 2520 2520)

say hd 100; # 2788815009188499086581352357412492142272
say chars hd 1000; # 433
say chars hd 10000; # 4345

Hoon, 95 bytes
|=
@
=+
n=(gulf 1 +<)
=+
f=(roll n mul)
(div f d:(egcd f (roll (turn n |=(@ (div f +<))) add)))

Create list [1...n], fold over it with ++mul for the factorial, create list [n!/1, n!/2, ... n!/n] and sum it, find GCD of n! and the list, and divide the factorial by that number.
There's probably a much easier way to calculate the denominator, but I can't figure it out :/

Oh Hoon, why your tokenizer needs so many redundant whitespaces?

All my Hoon entries look ugly because of the newlines :( Normal Hoon code uses two spaces between tokens, but one newline is shorter

Axiom, 34 bytes
f(x)==denominator(sum(1/n,n=1..x))

test
(24) -> [[i,f(i)] for i in 1..30]
   (24)
   [[1,1], [2,2], [3,6], [4,12], [5,60], [6,20], [7,140], [8,280], [9,2520],
    [10,2520], [11,27720], [12,27720], [13,360360], [14,360360], [15,360360],
    [16,720720], [17,12252240], [18,4084080], [19,77597520], [20,15519504],
    [21,5173168], [22,5173168], [23,118982864], [24,356948592],
    [25,8923714800], [26,8923714800], [27,80313433200], [28,80313433200],
    [29,2329089562800], [30,2329089562800]]
                                       Type: List List Expression Integer

PHP, 81 Bytes
for($p=1;$z++<$argn;$n=$n*$z+$p/$z)$p*=$z;for($t=1+$n;$p%--$t||$n%$t;);echo$p/$t;

Try it online!

Japt, 12 bytes
l
/yNÎõ@/XÃx

Try it
l\n/yNÎõ@/XÃx     :Implicit input of integer U
l                 :Factorial
 \n               :Reassign to U
   /              :Divide by
    y             :GCD with
     N            :  Array of all inputs
      Î           :  First element (i.e., original input)
       õ          :  Range [1,NÎ]
        @         :  Map each X
         /X       :    Divide U by X
           Ã      :  End map
            x     :  Reduce by addition

Factor + math.unicode, 35 bytes
[ 1 swap [1,b] n/v Σ denominator ]

Try it online!

Arturo, 38 bytes
$=>[denominator∑map..1&=>reciprocal]

Try it

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
¡ǝƃuǝןןɐɥɔ uʍop ǝpısdn
Turn the characters abcdefghijklmnopqrstuvwxyz!?., upside down and don't modify the other characters. Then, reverse the text to achieve the upside down affect. If text is already upside down, turn it right side up. Don't modify capitals.
Use this as a reference:
abcdefghijklmnopqrstuvwxyz!?.,
ɐqɔpǝɟƃɥıɾʞןɯuodbɹsʇnʌʍxʎz¡¿˙'

Rules

Newlines must be supported
You only have to convert the above character set.
Don't forget you need to reverse the characters.
This question is symmetrical unlike Small Caps Converter.

Test cases
42 is the meaning of life -> ǝɟıן ɟo ƃuıuɐǝɯ ǝɥʇ sı 24
halp why is my keyboard typing upside down??? :( -> (: ¿¿¿uʍop ǝpısdn ƃuıdʎʇ pɹɐoqʎǝʞ ʎɯ sı ʎɥʍ dןɐɥ
lol -> ןoן
uoɥʇʎpʎzɐɹc -> ɔrazydython

Look at my username!

Your last test case breaks "don't modify capitals".

@Geobits I told myself to fix that later but then I forgot. Silly me!

Your... last testcase... breaks... Don't modify capitals.

Would this qualify as [tag:kolomorgov-complexity]?

@LeakyNun I should proofread my challenges...

Isn't this too similar to Sᴍᴀʟʟ Cᴀᴘꜱ Cᴏɴᴠᴇʀᴛᴇʀ?

@manatwork You have to reverse the characters too.

None of your test cases have lines breaks or mixed (some right-side-up, some upside-down)

Not another question on the brink of closing....

Many solutions below can be improved by removing o, s, x, and z from the LUTs.

Ruby, 78 bytes
I need to use an actual byte counter more often
->s{s.reverse.tr'a-z!?.,',"ɐqɔpǝɟƃɥıɾʞןɯuodbɹsʇnʌʍxʎz¡¿˙'"}

Try it online

Very nice indeed!

It would be 78 bytes, lol. 2D 3E 73 7B 73 2E 72 65 76 65 72 73 65 2E 74 72 27 61 2D 7A 21 3F 2E 2C 27 2C 22 C9 90 71 C9 94 70 C7 9D C9 9F C6 83 C9 A5 C4 B1 C9 BE CA 9E D7 9F C9 AF 75 6F 64 62 C9 B9 73 CA 87 6E CA 8C CA 8D 78 CA 8E 7A C2 A1 C2 BF CB 99 27 22 7D

@Adnan, fixed the byte count

@KevinLau-notKenny, was the problem characters vs bytes?

@SolomonUcko if you're talking about my comment about needing to use a byte counter, yes. This had 59 characters which tied with Pyth's byte count, so I was bragging about tying with Pyth even though my bytecount wasn't actually the same

Retina, 73 bytes (54 chars)
Translate the chars, then reverse the input. I was pretty confused while making this until I realized some of the chars need to be escaped.
T`ɐqɔ\pǝɟƃɥıɾʞןɯu\o\dbɹsʇnʌʍxʎz¡¿˙'l!?.,`l!?.,o
O$^s`.

Try it online!

Pyth, 59 bytes
X_z+G"!?.,'˙¿¡zʎxʍʌnʇsɹbdouɯןʞɾıɥƃɟǝpɔqɐ

Test suite.
Obligatory hexdump:
58 5F 7A 2B 47 22 21 3F 2E 2C 27 CB 99 C2 BF C2
A1 7A CA 8E 78 CA 8D CA 8C 6E CA 87 73 C9 B9 62
64 6F 75 C9 AF D7 9F CA 9E C9 BE C4 B1 C9 A5 C6
83 C9 9F C7 9D 70 C9 94 71 C9 90

That was golfed quite a bit.

Damn and I thought I  was in with a chance when this first landed :P

Yeah, it was embarrassing.

might ." work? or are they at far away code points?

@Maltysen ." only works when the code-points of each character is similar. In this case, the code-points from inverted z to inverted a are: [122, 654, 120, 653, 652, 110, 647, 115, 633, 98, 100, 111, 117, 623, 1503, 670, 638, 305, 613, 387, 607, 477, 112, 596, 113, 592].

@LeakyNun ok. wonder why unicode does this

@Maltysen z, x, s, o are preserved; n and u are swapped; b and q are swapped; d and p are swapped; inverted y, w, v belong to IPA, and stuff.

Python 3, 144 bytes
Don't work in the Windows terminal...
print(''.join([dict(zip("abcdefghijklmnopqrstuvwxyz!?.,","ɐqɔpǝɟƃɥıɾʞןɯuodbɹsʇnʌʍxʎz¡¿˙'")).get(x,x)for x in input()[::-1]]))

This can be heavily golfed.

@LeakyNun I know, the vars were for debugging purpose...

Then you can remove them now. reversed can be replaced by [::-1]. Converting it to a lambda may save some bytes.

@LeakyNun Thank you !

@KevinLau-notKenny It's for python 2 or 3 ? Because on my python 3 installation it throw a error

@KevinLau-notKenny ValueError: the first two maketrans arguments must have equal length maketrans probably don't work with unicode...

Another thing you can do to save on code since str.translate isn't working: call dict on your zipped values instead of building the dictionary manually like you do.

@KevinLau-notKenny Thanks you !

Also, https://repl.it/languages/python3 supports your code so it works on more than just IDLE.

Why did you revert to the older version? The dict solution still works https://repl.it/C1Zt

@KevinLau-notKenny i don't know why it have been reverted, i fix it

JavaScript (ES6), 140 bytes

f=
s=>[...s].map(c=>r=((i=u.indexOf(c)+26)<26?c:u[i%52])+r,r="",u="abcdefghijklmnpqrtuvwy!?.,ɐqɔpǝɟƃɥıɾʞןɯudbɹʇnʌʍʎ¡¿˙'")&&r
;
<input oninput=o.value=f(this.value)><input id=o style=text-align:right>

Edit: Saved 8 bytes thanks to @Dúthomhas.

Perl, 88 bytes
78 bytes code + 10 for -Mutf8 -n
y/a-z!?.,/ɐqɔpǝɟƃɥıɾʞןɯuodbɹsʇnʌʍxʎz¡¿˙'/;print reverse/./g

Usage
Save as upsidedown.pl and run:
perl -Mutf8 -n upsidedown.pl <<< '42 is the meaning of life'
ǝɟıן ɟo ƃuıuɐǝɯ ǝɥʇ sı 24


text:
A Hundred Squares!
Back to basics...
As a teacher at the local primary (grade?) school, you need a way to teach your class their times tables. At your disposal, you have hundred squares and a load of red pens. You need to also be able to show your class the correct answers quickly.
Now, you're clever enough to write a program that can do times tables, but can you draw them on a hundred square?
The challenge
Output a hundred square to stdout or equivalent using ansi-escape codes to shade in numbers which are multiples of the input.

Output a 10x10 grid containing the numbers 1-100.

It doesn't matter the alignment of 2 digit numbers in each box as long as it's consistant
For 1 digit numbers, you may pad to 2 digits and use the same formatting as 2 digit numbers or centered in the middle of the box.

If the number in the box is a multiple of the input, colour the entire box red.

This means the whole box, not just the number part

For example, given the input 3, print the given hundred square

This is code golf so the shortest answer in bytes wins!

Can we print 01 instead of 1. 02 for 2, etc etc

So I can't use <table>, for example?

Does the colour of the numbers matter? Can it be white or grey?

@Keatinge I haven't decided yet - I'm veering towards yes @nicael no, it has to be using ansi-escapes or answers wouldn't be on the same playing field, @BassdropCumberwubwubwub you may use different colours but unless you're using curses it shouldn't matter - red is short anyway.

@Keatinge yes you may use padding - but only with zeros and one one digit numbers only

ANSI codes aren't supported by windows,,,

@TùxCräftîñg I haven't tried it but https://github.com/adoxa/ansicon - I've got putty on my windows box

@muddyfish It don't compile on my machine

@TùxCräftîñg try mobaXterm - I've just tried it and and it works locally with ansi

My reference golfed python solution is about 272 bytes - It could easily be beasten though with minimal optimisation

@TùxCräftîñg Doesn't mean the question should be closed or is a bad challenge ¯_(ツ)_/¯

@Insane I have never sayed that this is a bad challenge

@TùxCräftîñg I know

Python 2, 166 bytes
R=range;n=input()
for y in R(21):print''.join('♥[%dm%s♥[m'%(any(5>x-k%10*4>-1<y-k/10*2<3for k in R(n-1,100,n))*41,('+---|%2d '%(x/4+y*5-4))[y%2*4+x%4])for x in R(41))

Replace ♥ by octal 033 (the ANSI escape character).

Explanation
We treat the output as a 41×21 grid, and directly compute the character and color at each point.
That is, the structure of the code is:
n = input()
for y in range(21):
    print ''.join(F(x, y) for x in range(41))

for some function F.
The result of F is always of the following form:

An ANSI Control Sequence Introducer (\33[).
An SGR code: 0m for reset, or 41m for red background.
A single character. (+, -, |, space, or digit)
An SGR reset sequence (\33[m).

We use the format string '\33[%dm%s\33[m', where the first %d is either 0 or 41, and the %s is the character we wish to print.

For the color, we have the following formula:
any(5>x-k%10*4>-1<y-k/10*2<3for k in R(n-1,100,n))*41

I’m not going to fully explain this, but it basically loops over all rectangles that should be colored red, and checks if (x, y) is inside any of them.
Note the use of operator chaining: I rewrote -1<A<5 and -1<B<3 into 5>A>-1<B<3.

For the character, we have the following formula:
('+---|%2d '%(x/4+y*5-4))[y%2*4+x%4]

If y % 2 == 0 then for x = 0, 1, … this will generate +---+---+---…
If y % 2 == 1 then for x = 0, 1, … this will generate | p |p+1|p+2…

One of these days, there's going to be a challenge where you actually need to use a literal ♥ in the code, and everybody will be confused ;)

Would love to see an explanation.

@shaunakde I wrote something up (but saved some bytes in the process, so maybe it also got slightly harder to follow… ^^)

@Lynn - Here I thought I had you beat with my Julia code, and you go and tweak just enough to beat me by 1.

@Lynn Thank you so much for taking the time and energy to explain this code. I am very thankful for this explanation. It helped me learn a lot!

You’re very welcome! :)

Julia, 219 182 169 167 bytes
!n=(~j=j%n<1;k(v=j->"---",c=+,s="$c\e[m";l=~)=println([(l(j)?"\e[;;41m$c":s)v(j)for j=10i+(1:10)]...,s);i=0;k();for i=0:9 k(j->lpad(j,3),|);k(l=j->~j|~(j+10(i<9)))end)

Used like this: !7
Ungolfed:
function !(n::Integer)
     for j=(1:10)     #This loop generates the top of the box
       if (j%n==0)
         print("\e[;;41m+---") #"\e[;;41m" is the ANSI escape code
                               #for red background colour in Julia
       else
         print("+\e[m---")     #"\e[m" resets to original colours
       end
     end
     println("+\e[m")
     for i=0:9
       for j=10i+(1:10)  #This loop generates the rows with the numbers
         if (j%n==0)
           print("\e[;;41m|",lpad(j,3))
         else
           print("|\e[m",lpad(j,3))
         end
       end
       println("|\e[m")
       for j=10i+(1:10)  #This loop generates the other rows
         if (j%n==0)||((j+10)%n==0&&i<9)
           print("\e[;;41m+---")
         else
           print("+\e[m---")
         end
       end
       println("+\e[m")
     end
   end

Note that this is very ungolfed, for maximal readability.

HTML + Javascript, 379
HTML:
<input id=a value=3><pre id=z>

Javascript:
for(i=0,s=`\n|`,o='+';i++<109;x=i<10?` ${i} `:i-100?' '+i:i,s+=x+'|',o+=x='---+',i%10||(o+=s+'\n+',s=`\n|`));z.innerHTML=[...o+x].map((x,i)=>`<span id=i${i}>${x}</span>`).join``;f=m=>window['i'+m].style.background='red';for(j=k=+a.value;j<=100;j+=k){p=(j/10|0)*84+((m=j%10)?(m-1)*4:-48);'000102030442434445468485868788'.match(/../g).map(x=>f(+x+p))}

jsfiddle.


text:
OMG! We're Twinning!
Introduction
We define twin primes as two natural numbers p,p+2 which both are prime.
Example: 5 and 7 are twin primes.
Let's define the twin number of some set of numbers as the number of twin prime numbers in that set
Example: {6,7,11,13,18,29,31} has a twin number 4, since there are four twin primes; 11,13 and 29,31.
Program
Input: A number n
Output: The twin number of the set of all natural numbers below n
Scoring
This is code-golf, so lowest bytes wins.

Do you have some test cases?

@CᴏɴᴏʀO'Bʀɪᴇɴ Natural number must also be whole numbers, and I assume he only wants us to deal with whole number primes

@SpeedyNinja Sorry, I misremembered the definition of natural numbers, sorry

I'm not sure I understand the definition. The example set seems to have 4 twin primes. Are we supposed to count the number of pairs? If so, does 3, 5, 7 count as two pairs? What if one of the primes is in the set, but the other one isn't?

@Dennis 'twas but a mistake. fixed.

Not much clearer I'm afraid. twin number 2, since there are four twin primes

@Dennis what a blunder

OK, I'm reopening, but a few test cases would still be helpful.

I think the wording is a little off. Are you defining twin to be one prime? Typically we would refer to the pair as a twin. Just add test cases and then your wording is less critical.

What happens if only one of the pair is in the set, e.g. {11}?

I think this is a duplicate of Find the Nth pair of twin primes. This one has you count them and that one has you generate them counting up, but the core process of enumerating and checking twin primes is the same.

@sp3000 In that case, since 11 belongs to a pair, it's twin number is 1.

MATL, 7 bytes
qZqd2=s

This solution exploits the fact that the prime gap (the difference between successsive prime numbers) is always >= 2 (with the exception being the gap between 2 and 3). Because of this fact, all twin primes will be successive prime numbers. In this solution we just compute the differences between all primes less than the input n and count how many of these differences are equal to 2.
Try it Online
Explanation
    % Implicitly grab input, N
q   % Subtract one from the input (N-1)
Zq  % Get an array of all primes <= (N-1)
d   % Compute successive differences (prime gaps)
2=  % Create a boolean array indicating which prime gaps are equal to 2
s   % Count the TRUE values in this array to determine the twin number
    % Implicitly display the result

If you instead want the not the number of pairs but the number of primes that are part of a pair, the following would work
qZqt!-|H=az

Try it Online

Jolf, 10 bytes
ZlZd~Bx©{2

Try it here!
Explanation
ZlZd~Bx©{2
    ~B     all numbers satisfying
       ©{  the prime condition ("the prime directive"?)
      x    below x
  Zd       (the differences between indices)
Zl       2 count the number of 2's

Ruby, 43 + 8 (-rprime flag) = 51 bytes
->n{Prime.each(n-1).count{|i|(i-2).prime?}}

Perl 6,  54  53 bytes
{2*(3..$_).rotor(3=>-1).grep: {all .[0,2]».is-prime}}
{2*(3,5...$_).rotor(2=>-1).grep: {all $_».is-prime}}
Explanation:
{
  2
  *
  (3,5...$_)        # odd numbers
  .rotor( 2 => -1 ) # grab 2 then backup one, repeat
  .grep:            # find all that match the following
    {
      # create a Junction object of the following
      all

        # call .is-prime on both elements of the
        # list given to this inner block
        $_».is-prime
    }
}