text:
Densely packed decimal (DPD) to decimal, with logic gates
Inspired by recent popularity of nandgame on TNB, and my own previous challenge.
Background
Densely packed decimal (DPD) is a way to efficiently store decimal digits in binary. It stores three decimal digits (000 to 999) in 10 bits, which is much more efficient than naive BCD (which stores one digit in 4 bits).
Conversion table
DPD is designed to easily convert between the bits and the digits by simple pattern matching from top to bottom. Each bit pattern defines how many high digits (8-9) the number has, where they are, and how to move the bits to form the decimal representation.
The following is the conversion table from 10 bits of DPD to three decimal digits. Each decimal digit is represented as 4-bit binary (BCD). Both sides are written left to right from the most significant digit to the least.
Bits                 =>  Decimal         (Digit range)

a b c d e f 0 g h i  =>  0abc 0def 0ghi  (0-7) (0-7) (0-7)

a b c d e f 1 0 0 i  =>  0abc 0def 100i  (0–7) (0–7) (8–9)
a b c g h f 1 0 1 i  =>  0abc 100f 0ghi  (0–7) (8–9) (0–7)
g h c d e f 1 1 0 i  =>  100c 0def 0ghi  (8–9) (0–7) (0–7)

g h c 0 0 f 1 1 1 i  =>  100c 100f 0ghi  (8–9) (8–9) (0–7)
d e c 0 1 f 1 1 1 i  =>  100c 0def 100i  (8–9) (0–7) (8–9)
a b c 1 0 f 1 1 1 i  =>  0abc 100f 100i  (0–7) (8–9) (8–9)
x x c 1 1 f 1 1 1 i  =>  100c 100f 100i  (8–9) (8–9) (8–9)
Notations

The lowercase letters a to i are the bits that are copied to the decimal representation.
0 and 1 are the exact bits in the input or output bit patterns.
x bits are ignored in the conversion.

Task
Build a logical circuit using two-input NAND gates to convert 10 bits of DPD to 12 bits of BCD.
Examples
Emphasized bits are the pattern-matching bits.
DPD                    Decimal  BCD
0 0 0 0 0 0 0 1 0 1    005      0000 0000 0101
            ^
0 0 0 1 1 0 0 0 1 1    063      0000 0110 0011
            ^
0 0 0 1 1 1 1 0 0 1    079      0000 0111 1001
            ^ ^ ^
0 0 0 0 0 1 1 0 1 0    090      0000 1001 0000
            ^ ^ ^
0 0 0 1 0 1 1 1 1 0    098      0000 1001 1000
      ^ ^   ^ ^ ^
1 0 1 0 1 1 1 0 1 0    592      0101 1001 0010
            ^ ^ ^
0 0 1 1 0 0 1 1 0 1    941      1001 0100 0001
            ^ ^ ^
1 1 0 0 1 1 1 1 1 1    879      1000 0111 1001
      ^ ^   ^ ^ ^
1 1 1 0 0 0 1 1 1 0    986      1001 1000 0110
      ^ ^   ^ ^ ^
0 0 1 1 1 1 1 1 1 1    999      1001 1001 1001
      ^ ^   ^ ^ ^
1 1 1 1 1 1 1 1 1 1    999      1001 1001 1001
      ^ ^   ^ ^ ^
Scoring & winning criterion
The score is the number of two-input NAND gates used in your circuit. The lowest score wins.
You may define small components in terms of two-input NAND gates, and then use them in your final construction. If a component X includes N two-input NAND gates, each usage of X adds N to your score. For basic logic gates, this means:

NOT: +1
2-input AND: +2
2-input OR: +3
2-input XOR: +4

Rolled back Luis' edit because atomic-code-golf is a winning criterion tag and [tag:code-challenge] is for questions which have a winning criterion not covered by other tags.

This is still unclear to me. I think there needs to be further description of what the letters a to i mean and the process of converting. Go through the steps, rather than just showing examples and hoping we understand from that.

@mbomb007, maybe it's just clear to me because one of my languages is SML. That first code block is virtually a reference implementation in a pattern-matching language (although it works better in SMLNJ, which echos the result of each statement, than in MLton).

@mbomb007 I tried to clarify the pattern-matching nature of the conversion table. Does it help?

@Bubbler Yeah, that's helpful

45 39 NANDs (or 43 37)
39 seems to be the absolute minimum, but it is possible to reach 37 NANDs by a trick: By assuming that the largest numbers are correctly encoded.
888, 889, 898, 899, 988, 989, 998, 999 are to be encoded
with the 2 MSB as 00, requiring just 37 NANDs for decoding.
However, in the specification for decoding, they are specified to be ignored, meaning they can be anything. It is a reasonable assumption that this freer specification could require even fewer gates, but the opposite is true. 39 gates are required for this. This saving could give real benefits for real circuits.
I also found circuits that were significantly more efficient and faster, containing a few more gates.
No pencil drawn image of the circuit this time. Perhaps later.
The circuit is presented in obvious Verilog code, ready for running with test included.
Verilog code:
// Densely packed decimal (DPD) to decimal, circuit in Verilog.
// Made of just 39 NANDs.
//
// By Kim Øyhus 2019 (c) into (CC BY-SA 3.0.)
// This work is licensed under the Creative Commons Attribution 3.0
// Unported License. To view a copy of this license, visit
// https://creativecommons.org/licenses/by-sa/3.0/
//
// This is my entry to win this Programming Puzzle & Code Golf
// at Stack Exchange:
// https://codegolf.stackexchange.com/questions/176557/densely-packed-decimal-dpd-to-decimal-with-logic-gates
//
// TASK:
// 3 decimal digits are stored in 10 bits in the DPD format,
// and this circuit transforms them into 3 decimal digits in
// 4 bits each, BCD format.
//
// 39 gates seem to be the smallest possible NAND circuit there is
// for this task, but I can get even lower by a trick, to 37:
// I assume that the largest numbers are correctly encoded.
//   888, 889, 898, 899, 988, 989, 998, 999 are to be encoded
// with the 2 MSB as 00, requiring just 37 NANDs for decoding.
//
//   However, in the specification for decoding, they are specified
// to be ignored, meaning they can be anything. It is a reasonable
// assumption that this freer specification could require even fewer
// gates, but the opposite is true. 39 gates are required for this.
// This saving could give real benefits for real circuits.
//
//   This DPD format seems to be used a lot for storing decimal numbers
// in computers and IO for ALUs, even though it is stored as 12 bits
// per 3 digits inside the ALUs and for other calculations.
// There are many patents for these kinds of circuits, and so I am
// a little skeptical for making a free one for a competition.
// However, the point is to make it as small as possible and of just
// NAND gates, which in itself is not so commercially interesting.

module decode1000 ( in_000, in_001, in_002, in_003, in_004, in_005, in_006, in_007, in_008, in_009, out000, out001, out002, out003, out004, out005, out006, out007, out008, out009, out010, out011 );
  input  in_000, in_001, in_002, in_003, in_004, in_005, in_006, in_007, in_008, in_009;
  output out000, out001, out002, out003, out004, out005, out006, out007, out008, out009, out010, out011;
  wire   wir000, wir001, wir002, wir003, wir004, wir005, wir006, wir007, wir008, wir009, wir010, wir011, wir012, wir013, wir014, wir015, wir016, wir017, wir018, wir019, wir020, wir021, wir022, wir023, wir024, wir025, wir026, wir027, wir028, wir029, wir030, wir031, wir032;

// The 3 bits of 1s goes straight through from input to output.
  assign out000 = in_000;
  assign out004 = in_004;
  assign out008 = in_007;

  nand gate001 ( wir001, in_003, in_001 );
  nand gate002 ( wir002, in_002, in_003 );
  nand gate003 ( wir003, wir001, in_006 );
  nand gate004 ( wir004, wir002, in_001 );
  nand gate005 ( wir005, wir001, wir001 );
  nand gate006 ( wir006, in_005, in_001 );
  nand gate007 ( wir007, wir006, in_003 );
  nand gate009 ( wir008, wir004, wir007 );
  nand gate010 ( wir009, wir005, in_006 );
  nand gate011 ( wir010, wir007, wir007 );
  nand gate012 ( wir011, wir009, in_002 );
  nand gate013 ( wir012, wir011, wir009 );
  nand gate014 ( wir013, wir011, wir011 );
  nand gate015 ( wir014, in_008, wir013 );
  nand gate016 ( wir015, in_009, wir013 );
  nand gate017 ( wir016, wir010, wir014 );
  nand gate018 ( wir017, wir014, wir005 );
  nand gate019 ( wir018, wir015, wir015 );
  nand gate020 ( wir019, wir011, wir008 );
  nand gate021 ( wir020, wir019, wir006 );
  nand gate022 ( wir021, wir010, wir018 );
  nand gate023 ( wir022, wir020, wir004 );
  nand gate024 ( wir023, wir016, wir008 );
  nand gate025 ( out001, wir023, wir023 );
  nand gate026 ( out003, wir022, wir022 );
  nand gate027 ( wir024, wir005, wir008 );
  nand gate028 ( wir025, wir012, wir002 );
  nand gate029 ( wir026, wir019, in_003 );
  nand gate031 ( out007, wir024, wir009 );
  nand gate032 ( out011, wir026, wir026 );
  nand gate033 ( wir028, wir017, in_005 );
  nand gate035 ( wir030, wir026, in_008 );
  nand gate036 ( out005, wir028, wir028 );
  nand gate037 ( out009, wir030, wir030 );
  nand gate039 ( wir031, wir026, in_009 );
  nand gate041 ( out010, wir031, wir031 );
  nand gate042 ( wir032, out003, wir018 );
  nand gate043 ( out006, wir003, wir032 );
  nand gate044 ( out002, wir025, wir021 );
endmodule

module test;
   reg  [ 9:0] AB; // input DPD
   wire [11:0] C; // output BCD

  decode1000 U1 (
  .in_000 (AB[ 0]),
  .in_001 (AB[ 1]),
  .in_002 (AB[ 2]),
  .in_003 (AB[ 3]),
  .in_004 (AB[ 4]),
  .in_005 (AB[ 5]),
  .in_006 (AB[ 6]),
  .in_007 (AB[ 7]),
  .in_008 (AB[ 8]),
  .in_009 (AB[ 9]),
  .out000 ( C[ 0]),
  .out001 ( C[ 1]),
  .out002 ( C[ 2]),
  .out003 ( C[ 3]),
  .out004 ( C[ 4]),
  .out005 ( C[ 5]),
  .out006 ( C[ 6]),
  .out007 ( C[ 7]),
  .out008 ( C[ 8]),
  .out009 ( C[ 9]),
  .out010 ( C[10]),
  .out011 ( C[11])
  );

   initial  AB=0;  //unary=0;  binary=0
  always  #1  AB = AB+1;
  initial  begin
    $display("\t\ttime,\tinn 10bit   \tout 3x4bit");
    $monitor("%d,\t%b %b %b\t%b %b %b\t %d%d%d",$time, AB[9:7],AB[6:4],AB[3:0], C[11:8], C[7:4], C[3:0],  C[11:8], C[7:4], C[3:0]);
  end
  initial  #1023  $finish;
endmodule

// How I run and test it:
// iverilog -o decode1000 decode1000.v
// vvp decode1000
```

If you assume the input is correctly encoded (the last 24 values don't appear), then you have 288 don't cares in your truth table. If you don't, you have no don't cares, which can only increase the required gates.

However, when decoding, if you allow yourself to put in any value for those two bits in case of 888 889 898 899 988 989 998 999, you go from no don't cares to 16, which can only decrease the required gates.

There's no reason to do double-negation of wires. Direct connection of c/f/i will save you six NANDs, bringing it down to 39/37.

And a BIG thanks to NoLongerBreathedIn who discovered I had forgot to remove 3 double inverters I used as wires. I would have discovered this if I had made a pencil drawing this time too, but I was just too tired of these very hard projects. I have more profitable things to do.
As for "don't cares", you are mistaken. If there is a sub circuit which happen to calculate the wanted value at the correct input, but also happen to calculate wrong values at the other less correct inputs, then gates can be saved by using that sub circuit instead. I use effects like this to make my minimal circuits

Right. What I meant is this: If you were to write down the full 1024x12 truth tables for the "input correctly encoded" version and for the "input might be wrong" version, the former has 288 Xs, and the latter has every X filled in with a T or F but is otherwise identical. Thus, any circuit for the latter operation will work for the former, so the minimum size circuit for the former can be no bigger.

You misunderstand what I wrote. Having wild cards on the input is quite different from having wild cards on the output. And what I talked about is more akin to the entropy of the specification. And I have of course gone through the simple optimisations and far beyond to make my minimal circuits.

65 62 60 58 NANDs
Taking the inputs as i0 to i9 and the outputs as o0 to o9, oa, ob we have
t0 = nand(i6, i7)
t1 = nand(t0, t0)
t2 = nand(i3, i4)
o0 = nand(nand(nand(t2, i3), t1), nand(nand(t2, i8), t1))
t3 = nand(o0, o0)
t4 = nand(i0, t3)
o1 = nand(t4, t4)
t5 = nand(i1, t3)
o2 = nand(t5, t5)
o3 = i2
# Score 13 for the first decimal digit

u0 = nand(i6, i8)
u1 = nand(u0, t0)
u2 = nand(i4, t2)
o4 = nand(nand(nand(u2, u0), u2), nand(u1, t0))
u3 = nand(o4, o4)
u4 = nand(o0, i8)
u5 = nand(u4, u4)
u6 = nand(u3, nand(nand(u5, i0), nand(u4, i3)))
o5 = nand(u6, u6)
u7 = nand(u3, nand(nand(u5, i1), nand(u4, i4)))
o6 = nand(u7, u7)
o7 = i5
# Score 20 for the second decimal digit

o8 = nand(nand(nand(nand(i4, i8), o0), t1), nand(nand(i6, u1), i6))
v2 = nand(o8, o8)
v3 = nand(i6, i6)
v4 = nand(i7, i7)
v5 = nand(v2, nand(nand(i6, nand(nand(i7, i0), nand(v4, i3))), nand(v3, i7)))
o9 = nand(v5, v5)
v6 = nand(v2, nand(nand(i6, nand(nand(i7, i1), nand(v4, i4))), nand(v3, i8)))
oa = nand(v6, v6)
ob = i9
# Score 25 for the third decimal digit

Python test framework to validate the correctness of the construction.


text:
Weight of the Least Weighted RoD Path
Let A be an m by n rectangular matrix of positive integers, where m and n are also positive integers.
We are interested in RoD ('Right-or-Down') paths from the upper-left cell of A to the lower right cell; in an RoD path, each successive cell of the path is either one cell to the Right of or one cell Down from the previous cell.
Given any such RoD path, we can take the sum of the cells in A in that path.
For example, consider the 4 by 3 matrix:
[ [1, 2, 3, 4],
  [5, 1, 6, 7],
  [8, 2, 1, 1] ]

Then we can consider the RoD path:
1 > 2   3   4
    v
5   1   6   7
    v
8   2 > 1 > 1

which has a sum of 1+2+1+2+1+1=8. It's worth noting that this path has the smallest sum of all possible RoD paths from upper left to lower right in that matrix.
So, the proposed challenge is to provide the shortest function/program in your language of choice that outputs the minimum sum an RoD path from upper left to lower right can have in a given matrix A.
The usual forbidden loopholes are in effect. Your input can be in any reasonable format; your output must be an integer.
This is code-golf; answers are scored by number of bytes.
Test Cases
[ [5] ] -> 5

[ [5, 2] ] -> 7

[ [5],
  [2] ] -> 7

[ [ 9 , 1 , 12, 3 ],
  [ 12, 11, 6 , 11],
  [ 12, 9 , 2 , 11] ] -> 40

[ [ 6 , 8 , 11, 2 ],
  [ 3 , 6 , 7 , 6 ],
  [ 6 , 2 , 8 , 12] ] -> 37

[ [ 4 , 5 , 8 , 4 ],
  [ 6 , 5 , 9 , 4 ],
  [ 2 , 5 , 6 , 8 ] ] -> 31

[ [ 4 , 5 , 15, 18, 30],
  [ 26, 26, 3 , 4 , 5 ],
  [ 7 , 9 , 29, 25, 14],
  [ 16, 1 , 27, 13, 27],
  [ 23, 11, 25, 24, 12],
  [ 17, 23, 7 , 14, 5 ] ] -> 94

[ [ 10, 15, 7 , 2 , 9 ],
  [ 24, 5 , 2 , 1 , 25],
  [ 2 , 12, 14, 30, 18],
  [ 28, 4 , 12, 22, 14],
  [ 15, 21, 21, 11, 4 ],
  [ 21, 15, 21, 29, 9 ] ] -> 103

J, 42 bytes
v(+}.<.}:)&.>/@{.[:</.(2#v=._1+1#.$){.!._]

Try it online!
How it works
v(+}.<.}:)&.>/@{.[:</.(2#v=._1+1#.$){.!._]
                         v=._1+1#.$         Sum of two dimensions - 1; assign to v
                                            (v is a verb)
                      (2#          ){.!._]  Extend the given array in both dimensions
                 [:</.  Extract the antidiagonals as boxed arrays
v             @{.  Take the first `v` antidiagonals
 (       )&.>/     Reduce over unboxed items:
   }.<.}:            Given the right item R, take the minimum of R[1:] and R[:-1]
  +                  Add to the left item

Illustration
1 2 3 4  Input array, dimensions = 3,4
5 1 6 7
8 2 1 1

1 2 3 4 _ _  Extended to 6,6 with filler _ (infinity)
5 1 6 7 _ _
8 2 1 1 _ _
_ _ _ _ _ _
_ _ _ _ _ _
_ _ _ _ _ _

1            Diagonalize and take first 6 rows
5 2
8 1 3
_ 2 6 4
_ _ 1 7 _
_ _ _ 1 _ _

Reduction: left+min(right[1:], right[:-1])
1                                          1  => 8
5 2                               5  2  => 10 7
8 1 3                   8 1 3  => 12 5 11
_ 2 6 4      _ 2 6 4 => _ 4 8 12
_ _ 1 7 _ => _ _ 2 8 _
_ _ _ 1 _ _

This is a really nice solution!

JavaScript (ES6), 78 77 76 bytes
m=>(M=g=s=>(v=(m[y]||0)[x])?g(s+=v,y++)|g(s,x++,y--)*x--|M<s?M:M=s:0)(x=y=0)

Try it online!
Commented
m => (                      // m[] = input matrix
  M =                       // initialize the minimum M to a non-numeric value
  g = s =>                  // g = recursive function taking the current sum s
    (v = (m[y] || 0)[x]) ?  //   if the current cell v is defined:
      g(s += v, y++) |      //     do a recursive call at (x, y + 1)
      g(s, x++, y--) * x--  //     do a recursive call at (x + 1, y)
      |                     //     if at least one call did not return 0 (which means
                            //     that we haven't reached the bottom-right corner)
      M < s ?               //     or M is less than s (false if M is still non-numeric):
        M                   //       return M unchanged
      :                     //     else:
        M = s               //       update M to s, and return this new value
    :                       //   else (we're outside the bounds of the matrix):
      0                     //     return 0
)(x = y = 0)                // initial call to g with s = x = y = 0

Haskell, 63 57 bytes
f x@((a:_:_):c:d)=a+min(f$c:d)(f$tail<$>x)
f x=sum$id=<<x

Try it online!
f x@((a:_:_):c:d)=           -- if it's at least a 2x2 matrix
   a+min                     -- add the top left element to the minimum of the
                             -- path costs of
        f$c:d                --   the matrix with the first row dropped and
        f$tail<$>x           --   the matrix with the first column dropped
f x=                         -- else, i.e. a 1xm or nx1 matrix, i.e. a vector
    sum$id=<<x               -- return the sum of this vector

MATL, 38 36 30 29 bytes
Thanks to @Giuseppe for pointing out a mistake, now corrected.
lyZyqsG&nghZ^Yc!tsGz=Z)Ys)sX<

Try it online! Or verify all test cases.
Explanation
l        % Push 1
y        % Input, implicit. Duplicate from below. Pushes the input below
         % the current 1, and a copy of the input on top
Zy       % Size of input. Gives [m, n]
qs       % Subtract 1 element-wise, sum. Gives m+n-2
G        % Push input again
&n       % Push size as two separate numbers. Gives m, n
gh       % Transform n into 1 and concatenate horizontally. Gives [m, 1]
Z^       % Cartesian power of [m, 1] raised to m+n-2. This produces the
         % Cartesian tuples as row of a matrix. A typical tuple may be
         % [1, m, 1, m, m]. This will define a path along the matrix in
         % linear, column-wise indexing (down, then across). So 1 means
         % move 1 step down, and m means move m steps "down", which is
         % actually 1 step to the right
Yc       % Concatenate strcat-like. This prepends the 1 that is at the
         % bottom of the stack to each row
!        % Transpose. Each tuple (extended with initial 1) is now a column
!ts      % Duplicate, sum of each column
Gz       % Number of nonzeros of input. Gives m*n-1
=Z)      % Keep only columns that sum m*n. That means that, starting from
Ys       % Cumulative sum of each column. This defines the path
)        % Index: pick entries specified by the path
s        % Sum of each column
X<       % Minimum
         % Display, implicit

Röda, 100 89 bytes
f A{g={|x,y|{g(x-1,y)if[x>0];g(x,y-1)if[y>0];[0]if[x+y=0]}|min|[A[x][y]+_]}g#A-1,#A[0]-1}

Try it online!
-9 bytes thanks to Cows quack

Hi! If you iterate from the ending point, you can get 91 bytes.

R, 90 bytes
function(m){l=sum(m|1)
if(l>1)for(i in 2:l)m[i]=m[i]+min(m[i-1],m[max(0,i-nrow(m))])
m[l]}

Try it online!
The naive solution: iterate through the array (down the columns), replacing each entry by the sum of itself and the minimum of its above and to-the-left neighbors, if they exist, then return the last entry.

Possibly computing all paths and selecting the minimum is golfier.

Perl 6, 57 54 bytes
my&f={|.flat&&.[0;0]+min (f(.[1..*]),f $_>>[1..*])||0}

Try it online!
Explanation
my&f={                                               }  # Function f
      |.flat&&  # Return empty slip if matrix is empty
              .[0;0]+  # Value at (0,0) plus
                     min  # Minimum of
                          f(.[1..*])   # Rows 1..*
                                     f $_>>[1..*]  # Columns 1..*
                         (          ,            )||0  # Or 0 if empty

53 bytes through using $! instead of &f

Python 3, 108 bytes
def f(A,m,n,i=0,j=0):r=i+1<m and f(A,m,n,i+1,j);d=j+1<n and f(A,m,n,i,j+1);return A[i][j]+min(r or d,d or r)

Try it online!
Ungolfed
def f(A, m, n, i=0, j=0):
    right = i + 1 < m and f(A, m, n, i + 1, j)
    down  = j + 1 < n and f(A, m, n, i, j + 1)
    return A[i][j] + min(right or down, down or right)

Jelly, 21 bytes
ZI_.ỊȦ
ŒJŒPÇƇLÐṀœị⁸§Ṃ

Try it online!
How?
ZI_.ỊȦ - Link 1: isDownRight?: List of 2d indices (limited to having no repetitions)
Z      - transpose
 I     - deltas (vectorises)
  _.   - subtract 1/2 (vectorises)
    Ị  - insignificant? (effectively _.Ị here is like "v in {0,1}? 1 : 0")
     Ȧ - any & all (0 if a 0 is present when flattened, else 1)

ŒJŒPÇƇLÐṀœị⁸§Ṃ - Main Link: list of lists of integers, A
ŒJ             - multi-dimensional indices of A
  ŒP           - power-set
     Ƈ         - filter keep only those truthy by:
    Ç          -   last link as a monad
       ÐṀ      - filter keep only those maximal by:
      L        -   length
           ⁸   - chain's left argument, A
         œị    - multi-dimensional index into (vectorises)
            §  - sum each
             Ṃ - minimum

APL (Dyalog Classic), 37 32 bytes
{⊃⌽,9e9(⊢⌊⍵+(2⊣⌿⍪)⌊2⊣/,)⍣≡+⍀+\⍵}

Try it online!
+⍀+\ partial sums horizontally and vertically - this provides an initial overestimate for the paths to each square
9e9(...)⍣≡ apply "..." until convergence, at each step passing some very large number (9×109) as left argument
, add 9e9-s to the left of the current estimate
2⊣/ take the first from each pair of consecutive cells, effectively dropping the last column
2⊣⌿⍪ same thing vertically - put 9e9 on top and drop last row
(2⊣⌿⍪) ⌊ 2⊣/, minima
⍵+ add the original matrix
⊢⌊ try to improve the current estimates with that
⊃⌽, bottom-right cell

Can you provide an explanation of your solution?

Java 8, 197 193 190 188 bytes
m->{int r=m.length-1,c=m[0].length-1,i=r;for(;i-->0;)m[i][c]+=m[i+1][c];for(i=c;i-->0;)m[r][i]+=m[r][i+1];for(i=r*c;i-->0;)m[i/c][r=i%c]+=Math.min(m[i/c+1][r],m[i/c][r+1]);return m[0][0];}

-9 bytes thanks to @ceilingcat.
Try it online.
General explanation:
I actually already did this challenge about a year ago with Project Euler #81, except that was limited to a square-matrix instead of an N by M matrix. So I slightly modified my code from back then to account for that.
I first sum the bottom row and rightmost column from the very last cell backwards. So let's use the example matrix of the challenge:
1, 2, 3, 4
5, 1, 6, 7
8, 2, 1, 1

The last cell remains the same. The second last cell of the bottom row becomes the sum: 1+1 = 2, and the same for the second last cell of the rightmost column: 1+7 = 8. We continue doing this, so now the matrix looks like this:
 1,  2,  3, 12
 5,  1,  6,  8
12,  4,  2,  1

After doing that, we look at all the remaining rows one by one from bottom to top and right to left (except for the last column/row), and we look for each cell at both the cell below it and right of it to see which one is smaller.
So the cell containing the number 6 becomes 8, because the 2 below it is smaller than the 8 right of it. Then we look at the 1 next of it (to the left), and do the same. That 1 becomes 5, because the 4 below it is smaller than the 8 right of it.
So after we're done with the second to last row, the matrix looks like this:
 1,  2,  3, 12
10,  5,  8,  8
12,  4,  2,  1

And we continue doing this for the entire matrix:
 8,  7, 11, 12
10,  5,  8,  8
12,  4,  2,  1

Now the very first cell will contain our result, which is 8 in this case.
Code explanation:
m->{                    // Method with integer-matrix input and integer return-type
  int r=m.length-1,     //  Amount of rows minus 1
      c=m[0].length-1,  //  Amount of columns minus 1
      i=r;              //  Index integer
  for(;i-->0;)m[i][c]+=m[i+1][c];
                        //  Calculate the suffix-sums for the rightmost column
  for(i=c;i-->0;)m[r][i]+=m[r][i+1];
                        //  Calculate the suffix-sums for the bottom row
  for(i=r*c;i-->0;)     //  Loop over the cells in reversed order:
    m[i/c][r=i%c]+=     //   Add to the value of the current cell:
      Math.min(         //    The minimum of:
        m[i/c+1][r],    //     The value in the cell below it
        m[i/c][r+1]);   //     And the value in the cell left of it
  return m[0][0];}      //  Return the value in the cell at index {0,0} as result

@ceilingcat That seems to give incorrect results, likely because the for(;++i<c;)m[r][i]+=m[r][i+1]; will now give cumulative prefix-sums instead of suffix-sums.

Charcoal, 46 bytes
≔Ｅ§θ⁰∧κΣ§θ⁰ηＦθ«≔§η⁰ζＦＬι«≔⁺⌊⟦§ηκζ⟧§ικζ§≔ηκζ»»Ｉζ

Try it online! Link is to verbose version of code. Explanation: This would probably be shorter if there was a three-argument reduce in Charcoal.
≔Ｅ§θ⁰∧κΣ§θ⁰η

Prefill the working array with large values except for the first which is zero.
Ｆθ«

Loop over the rows of the input.
≔§η⁰ζ

Initialise the current total with the first element of the working array.
ＦＬι«

Loop over the columns of the input.
≔⁺⌊⟦§ηκζ⟧§ικζ

Take the minimum of the current total and the current element of the working array and add the current element of the input to give the new current total.
§≔ηκζ

And store that back in the working array ready for the next row.
»»Ｉζ

Print the total once the input has been completely processed.

Jelly, 17 bytes
XL,1ẋLḊŒ!1;ⱮÄịẎ§Ṃ

Try it online!

Brachylog, 26 25 bytes
∧≜.&{~g~g|hhX&{b|bᵐ}↰+↙X}

Try it online!
-1 byte because the cut isn't necessary--you can't take the head of an empty list
There's probably a lot of room to golf this but I need sleep.
The approach boils down to trying every value for the output, smallest first, (∧≜.) until a path can be found (b|bᵐ) to the bottom right corner (~g~g) which produces that sum (hhX&...↰+↙X).

Java (JDK), 223 bytes
Takes input as a 2D List of ints.
Additional 19 bytes for import java.util.*; included.
import java.util.*;m->{var l=m.get(0);int s=m.size(),c=l.size(),x=-1>>>1,a=l.get(0);return s*c<2?a:Math.min(s>1?n.n(new Vector(m.subList(1,s))):x,c>1?n.n(new Vector<>(m){{replaceAll(l->new Vector(l.subList(1,c)));}}):x)+a;}

Try it online!

How it works
import java.util.*;                                     // Import needed for Vector class
m->{                                                    // Lambda that takes a 2D list of integers
    var r=m.get(0);                                     // Store first row in variable
    int h=m.size(),                                     // Store number of rows
        w=r.size(),                                     // Store number of columns
        x=-1>>>1,                                       // Store int max
        a=r.get(0);                                     // Store the current cell value
    return h*w<2?a:                                     // If matrix is single cell return value
        Math.min(                                       // Otherwise return the minimum of...

            h>1?                                        // If height is more than 1
                n.n(                                    // Recursively call this function with
                    new Vector(m.subList(1,h))):        // a new matrix, without the top row
                x,                                      // Otherwise use int max as there is no row below this

            w>1?                                        // If width is more than 1
                n.n(new Vector<>(m){{                   // Recursively call this function with a new matrix
                    replaceAll(                         // where all columns have been replaced with
                        l->new Vector(l.subList(1,w))   // cloned lists without the leftmost column
                    );
                }}):                                    // Otherwise use int max as there is
                x                                       // no column to the right of this
        )+a;                                            // Add the current cell value to the result before returning
}

Python 2, 86 bytes
f=lambda A:len(A)>1<len(A[0])and A[0][0]+min(f(zip(*A)[1:]),f(A[1:]))or sum(sum(A,()))

Try it online!
If B is the transpose of A, then the problem definition implies that f(A)==f(B).
A[1:] is the array A missing its top row. zip(*A[1:]) is the array A missing its leftmost column and transposed. sum(sum(A,())) is the sum of all elements in A.
If A has only a single column or single row, there is only one path, so f returns the sum of all elements in A; otherwise we recurse and return the sum of A[0][0] + the smaller of f of A missing the top row and f of A missing the leftmost column.

source: Stack Exchange

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

sort: votes


text:
How many moves?
Given two different positions on a chess board and the type of piece, output the minimum number of moves it will take for that piece to go from one position to another.
Rules
The given piece can be King,Queen,Rook,Knight and Bishop. (This input can be taken as any 5 unique characters)
The 2 positions can be taken in any convenient format,
Example:
a8 b8 c8 d8 ... h8
a7 b7 c7 d7 ... h7
...
...
a1 b1 c1 d1 ... h1

In case the piece cannot reach there, output anything other than a positive integer.
Examples
i/p ---- o/p
King
a1,a4    3
a1,h6    7
b3,h5    6

Queen
a1,a4    1
a1,h6    2
b3,f7    1

Rook
a1,a4    1
a1,h6    2
h2,c7    2

Knight
a1,a4    3
a1,h6    4
b2,d3    1
b2,c3    2
b3,c3    3
a1,b2    4

Bishop
a1,a4    -1
a1,h6    2
b2,d3    -1
e1,h4    1

Why do King need 12 to a1-h6? Can't King go diag?

@l4m2, corrected

Need Knight be searched? or is there easier solution?

The inference is that there are no pieces in between the origin and the destination, correct?

@guest271314, yes there are no other pieces on board.

@VedantKandoi can the two positions be identical? can we use 0 to indicate unreachability?

@ngn, you can use 0 to indicate unreachability, the 2 positions will always be different.

@ngn, corrected typo. Corner case was nice, added

All knight distances

Related  Finds fastest piece and has different shaped boards.

Some definitions (such as ISO-80000-2) of natural numbers include 0. Recommend substituting with "positive integer".

JavaScript (Node.js), 183 180 179 bytes
with(Math)(a,b,c,d,t,x=abs(a-c),y=abs(b-d),v=x<y?y:x,q=0|.9+max(/[18][18]/.test(a+b+9+c+d)-v?x/2:3,y/2,x*y?x*y-4?(x+y)/3:3:2))=>t?t==2&x+y?0:t&1>x*y|t/2&x==y?1:t<4?2:v:q+(q+x+y&1)

Try it online!
So long for edge case, thank Arnauld for checking. Knight test

@Arnauld Well corner really cost

I think you might be able to save a byte by replacing the last max with a ternary.

170 bytes (I think. I'm on my phone.)

@Shaggy was what Arnauld pointn that wrong

APL (Dyalog Classic), 117 107 105 103 98 97 95 92 89 87 bytes
{(⍎⍺⊃'⌈/' '≢∘∪~∘0' '+/×' '{⍺∊⍵:0⋄1+⍺∇i/⍨∨⌿2=|×/↑⍵∘.-i←,⍳8 8}/,¨⊂¨↓⍵' '≢∘∪×2=.|⊢')⊣|-⌿⍵}

Try it online!
left arg is piece type: 0=king, 1=queen, 2=rook, 3=knight, 4=bishop; right arg is a 2x2 matrix of coords, each row representing a position; returns 0 for unreachable
|-⌿⍵ computes the pair [abs(∆x),abs(∆y)]
(⍎⍺⊃...)⊣ chooses an expression from the "..." list; if it's a function, it's applied to |-⌿⍵; if it's a value (this happens only for a knight), ⊣ makes sure to return it instead of |-⌿⍵

king: max (⌈/) of the abs ∆-s
queen: remove zeroes (~∘0) and count (≢) unique (∪)
rook: sum (+/) of signa (monadic ×; 0 for 0, 1 for positive)
knight: {⍺∊⍵:0⋄1+⍺∇i/⍨∨⌿2=|×/↑⍵∘.-i←,⍳8 8}/,¨⊂¨↓⍵ - start with the initial position and recursively compute generations of knight moves until the final position is in the set; return recursion depth
bishop: are the parities of the two ∆-s equal? (2=.|⊢, equivalent to =/2|⊢) multiply the boolean result (0 or 1) by the count-unique (≢∘∪)

I love the ⍎⍺⊃. Very clever.

Japt, 67 bytes
®ra
g[_rw}_â è}@=ã ü;@pUÌïVõ á ÈíaY})Ìde[TT]}a Ä}_è}_ra v *Zâ l}]gV

Try it online!
That was quite an experience. I took a lot of inspiration from the excellent APL Answer. I suspect there is a lot of golfing still possible especially in the Knight code.
The positions are the first input, in the form [[x1,x2],[y1,y2]]. It should work fine on [[y1,y2],[x1,x2]] as well. Piece selection is the second input, with 0=king, 1=queen, 2=knight, 3=rook, 4=bishop. Note that Knight and Rook are swapped compared to the APL answer.
Explanation:
®ra         :Turn absolute positions into relative movement and store in U
®           : For each of X and Y
 ra         : Get the absolute difference between the start position and the end position

g[...]gV    :Apply the appropriate function
 [...]      : A list of functions
      gV    : Get the one indicated by the second input
g           : Apply it to U

_rw}        :King function
 rw         : Get the maximum of X and Y

_â è}       :Queen function
 â          : Get unique elements
   è        : Count non-zero elements

@=ã ü;@pUÌï2õ á ÈíaY})Ìde[TT]}a Ä}  :Knight function
 =ã ü;                              : Wrap U twice (U -> [[U]])
      @                      }a Ä   : Repeat until True; return number of tries:
        UÌ                          :  Get the previous positions
          ï                         :  Cartesian product with:
           2õ                       :   The range [1,2]
              á                     :   All permutations, i.e. [[1,2],[2,1]]
                ÈíaY})              :  Apply each move to each position
       p                            :  Store the new positions
                      Ìde[TT]       :  True if any are at the destination

_è}         :Rook function
 è          : Count non-zero elements

_ra v *Zâ l}    :Bishop function
 ra             : Absolute difference between X and Y
    v           : Is divisible by 2? (returns 1 or 0)
      *         : Times:
       Zâ       :  Get the unique elements
          l     :  Count them

@ETHproductions Good suggestions. While I was putting them in I found out that á worked to shorten [[1,2][2,1]] considerably.

Wow, never would have thought to use á, nice one!

A couple more suggestions: U is implicit after @, so you can save two bytes in the knight function. You can also start it out with @=ã ü; to save another. (The ã trick is clever too :-) )

@ETHproductions Good find, the times when U is implied are one of the things I haven't fully grasped yet.

Java (JDK), 229 bytes
(p,a,b,c,d)->{c^=a/4*7;a^=a/4*7;d^=b/4*7;b^=b/4*7;int x=c<a?a-c:c-a,y=d<b?b-d:d-b,z=(x^=y^(y=y<x?y:x))-y;return p<1?x:p<2?z*y<1?1:2:p<3?2-z%2:p<4?x+y<2?3:(a<c?a+b:c+d)+x<2|x==2&z<1?4:z+2*Math.ceil((y-z)/(y>z?3:4.)):z<1?1:~z*2&2;}

Try it online!
Explanations

The board is a 0-based board.
The returned-value is an integer, represented as a double. There will never be any decimal part.

Code:
(p,a,b,c,d)->{                          // double-returning lambda.
                                        // p is the piece-type (0: king, 1: queen, 2: rook, 3: knight, 4: bishop)
                                        // a is the origin-X
                                        // b is the origin-Y
                                        // c is the destination-X
                                        // d is the destination-Y
 c^=a/4*7;a^=a/4*7;                     // Mirror board if origin is in the top part of the board
 d^=b/4*7;b^=b/4*7;                     // Mirror board if origin is in the left part of the board
 int x=c<a?a-c:c-a,                     // x is the X-distance between a and c
     y=d<b?b-d:d-b,                     // y is the Y-distance between b and d
     z=(x^=y^(y=y<x?y:x))-y;            // z is the delta between x and y
                                        // also, swap x and y if necessary so that x is the greater value.
               //    At this point,
               //     x      cannot be 0 (because the two positions are different)
               //     z<1    means the origin and destination are on the same diagonal
               //     y<1    means the origin and destination are on the same horizontal/vertical line
 return
  p<1?x:                                //  For a king, just take the max distance.
  p<2?z*y<1?1:2:                        //  For a queen, just move once if in direct line, or twice.
  p<3?2-z%2:                            //  For a rook, just move once if on the same horizontal or vertical line, or twice
  p<4?                                  //  For a knight,
   x+y<2?3:                             //   Hardcode 3 if moving to the next horizontal/vertical square
   (a<c?a+b:c+d)+x<2|x==2&z<1?4:        //   Hardcode 4 if moving 2 cases in diagonal or one case in diagonal in a corner.
   z+2*Math.ceil((y-z)/(y>z?3:4.)):     //   Compute the number of moves necessary for the usual cases
  z<1?1:                                //  For a bishop, hardcode 1 if they are on the same diagonal
   ~z*2&2;                              //   Return 2 if they have the same parity else 0.
}

Credits

-2 bytes thanks to Arnauld, as well as for making me realize that I had an issue with all my corner-cases.

Charcoal, 108 bytes
Ｆ…β⁸Ｆ⁸⊞υ⁺ι⊕κ≔⟦⟦η⟧⟧δＷ¬№§δ±¹ζ⊞δΦυΦ§δ±¹⁼⁵ΣＥμＸ⁻℅ξ℅§κπ²≔Ｅη↔⁻℅ι℅§ζκε≡θKＩ⌈εQＩ∨∨¬⌊ε⁼⊟ε⊟ε²RＩ∨¬⌊ε²BＩ∧¬﹪Σε²∨⁼⊟ε⊟ε²NＩ⊖Ｌδ

Try it online! Link is to verbose version of code. Explanation:
Ｆ…β⁸Ｆ⁸⊞υ⁺ι⊕κ

List all the 64 squares of the board into the predefined empty list variable.
≔⟦⟦η⟧⟧δ

Make a list of lists whose first entry is a list containing the start position.
Ｗ¬№§δ±¹ζ

Repeat until the last entry of the list contains the end position.
⊞δΦυΦ§δ±¹⁼⁵ΣＥμＸ⁻℅ξ℅§κπ²

Filter all the board positions that are a knight's move away from any entry in the last entry of the list of lists and push that list to the list of lists. This includes positions previously visited but we weren't interested in them anyway, so we end up with a breadth first search of the board for the end position.
≔Ｅη↔⁻℅ι℅§ζκε

Calculate the absolute coordinate differences between the start and end positions.
≡θ

Select based on the input piece.
KＩ⌈ε

If it's a king then print the maximum absolute coordinate difference.
QＩ∨∨¬⌊ε⁼⊟ε⊟ε²

If it's a queen then print 2 unless the two differences are equal or one is zero.
RＩ∨¬⌊ε²

If it's a rook then print 2 unless one of the differences is zero.
BＩ∧¬﹪Σε²∨⁼⊟ε⊟ε²

If it's a bishop then print 0 if the squares are of opposite parity otherwise print 2 unless the two differences are equal.
NＩ⊖Ｌδ

If it's a knight then print the number of loops taken to find the end position.

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


text:
Lazy word problems
Summary
A teacher was told to prepare word problems for the students. She is given a list of equations and told to write them as the corresponding word problem. However, she is very lazy, so she doesn't put much creativity into it. Instead, she simply writes it literally. For example, when she reads 1+1, she writes one plus one, 47 * 2 would turn into forty seven times two, and 56.2 / 7.4 would become fifty six point two divided by seven point four.
Write some code to help this lazy teacher out.
Details

Numbers may include a decimal point and a negative sign.
Numbers should be written in the short scale. (i.e., 1,000,000,000 is one billion)
Numbers can go up to 999,999,999,999,999,999 (nine hundred ninety nine quadrillion...nine hundred ninety nine).
Groups of zeros must be left out. e.g. 1,000,000 is one million not one million zero thousand zero hundred.
There can be arbitrarily many digits past the decimal point.
Digits after the decimal point must be listed digit by digit. e.g. 12.34 is twelve point three four not twelve point thirty four.
Two numbers are always separated by an operator.
The valid operators are plus (+), minus (-), times (*), and divided by (/).
There are no parentheses.
Numbers such as 1234 may optionally include an and in their output, as in one thousand two hundred *and* thirty four.
Commas and whitespace on the input may be ignored.

Examples
Input: 24 + 65
Output: twenty four plus sixty five
Input: 3.33333 - 0
Output: three point three three three three three minus zero
Input: 3.6 * 18.18 / 999.0
Output: three point six times eighteen point one eight divided by nine hundred ninety nine point zero
Input: 1-1
Output: one minus one
Input: 1+-1
Output: one plus negative one
Input: 1,000,000,000 + 0.2
Output: one billion plus zero point two
Input: 123,000,456,789,012,345.6789
Output: one hundred twenty three quadrillion four hundred fifty six billion seven hundred eighty nine million twelve thousand three hundred forty five point six seven eight nine
Input: -4.3 * 7
Output: negative four point three times seven
Input: -1-1--1
Output: negative one minus one minus negative one

Could you add something like 123,456,789,012,345.6789 to the examples? It should cover a lot of test cases.

@maxb I added a group of 000 in there as well. How's that? I also changed the maximum number limit.

Looks perfect! Now I just have to get to coding...

Can we use minus instead of negative?

@JoKing No, there is a distinction between minus and negative.

@JoKing I'm sorry I misread your edit. No the output must have a single space between each word. You can still require the input have no whitespace, however.

For Mathematica: again there is a builtin, but / is over and negative number is minus, so it needs some manipulation.

@user202729 Amazing... why am I not surprised Mathematica has a builtin for this? :)

Converting integers to English words

Can we use ÷ for division instead of / and × or x for multiplication instead of * in the input?

@Arnauld nice catch on the spelling! Knew I'd mess that up somewhere. Also added your test case.

@Shaggy Yes you can.

Reverse question from JoKing's one: May we assume that all operators have whitespace between them and the neighbouring numbers?

@Οurous Whitespace in the input is of no consequence, so yes.

https://codegolf.stackexchange.com/questions/58368/isnt-the-point-of-math-to-just-use-numbers

JavaScript (ES6), 552 532 bytes
This filthy monster comes straight from the depths of code-golfing hell.
Expects an input string without any whitespace.
S=>S[R='replace'](/[\d.,]+|./g,s=>1/s[0]?a(+s[S=0]&&14)+s[R](/(\D?)(\d+)/g,(_,s,n)=>s>','?' point'+n[R](/./g,a):j--*n?(u=a(n%10||14),n>99?a(n[0])+' hundred':'')+((n%=100)<13?a(n||14):n<20?(a(n)||u)+'teen':(a(n/10+18)||a(n/10))+'ty'+u)+a(j+27)+(j>1?'illion':''):'',j=s.split`,`.length):a(S='+-*/'.indexOf(s=='-'&&S||s)+34),a=n=>(s='zero0one0two0three0four0five0six0seven0eight0nine0ten0eleven0twelve0thir00fif000eigh00twen0thir0for0fif000eigh00thousand0m0b0tr0quadr0negative0plus0minus0times0divided by'.split`0`[n|0])&&' '+s).trim()

Try it online!

You can cut 18 bytes by replacing your giant string literal with btoa`ÍêèÒ‰ÞÒÜ(ÒØkyí¢êô~+ÞÒÈ±ÒÇ¯z}ŠmÒx§{K^ŸG¥z÷§ÒÜ–÷´¶«ÓGâM4z(!ÓKpz}-†*ô~Šô~'ôÓG¢‚4¶.±©ÝÒmÒÚôªæ�¯IÞ�«b½í)–ë4š)î³Kb™ë4v+âuçu×Vò`.replace(111,' ').

I love responses that creatively compress string literals like this.

Perl 6, 434 401 387 359 bytes
{~S:g/\d+/{n($//100+64184)x($/>100),$/%100>19&&(n($//10%10+64175),n($!=$/%10)x?$!)||n($/%100+7679),[$,"thousand",|(<m b tr quadr>X~"illion")][+$/.postmatch.words[0].comb(',')]if +$/} /.trans("+,-/*"=><<plus''minus"divided by"times>>).words}o{S:g/\.(\d)+/ point {$0>>.&n}/}o{S:g/[\s|^]0/ zero/}o{S:g/\-(\d)/negative $0/}
my&n=(*+1632+|0).uniname.lc.words[2..*]

Try it online!
Definitely room for improvement here. I say that, but I keep noticing edge cases I haven't handled :(. Assumes that the input has operators separated by whitespace and the negative of a number isn't separated.
Explanation:
my&n=(*+1632+|0).uniname.lc.words[2..*]  # Define a helper function
           # This gets the unicode name, e.g ARABIC-INDIC DIGIT ZERO
           #                              or AEGEAN NUMBER ONE HUNDRED
           # And returns the 3rd word onwards in lowercase e.g. 'zero' or 'one hundred'
{S:g/\-(\d)/negative $0/}  # Turn dashes before numbers to negative
{S:g/[\s|^]0/ zero/}       # Handle zeros
{S:g/\.(\d)+/ point {$0>>.&n}/}  # Replace decimals
{~S:g/\d+/        # Replace series of numbers with
    n($//100+64184)x($/>100)  # The hundreds if the num is bigger than 100
    $/%100>19&&               # If the number is bigger than 19
      (
      n($//10%10+64175),         # The tens number
      n($!=$/%10)x?$!            # And the singles number (if it's not zero)
      )
    ||                        # Else
      n($/%100+7679)             # The name of the number below 20
    ,                      # Then
    [$,"thousand",|(<m b tr quadr>X~"illion")][   # Index into the list of postfixes
      +                         .comb(',')   # The number of commas
       $/.postmatch.words[0]  # in the rest of the number
  if +$/           # All if the number is not 0
.trans("+,-/*"=><<plus''minus"divided by"times>>)  # Translate operators
                                                   # And remove commas
.words}     # And remove all the excess spaces between words

Ruby + Swift 4, 283 279 270 bytes
$_=gsub(/(?<=\d)-/,"minus ").gsub(/[*-\/]/,?.=>"point ",?-=>"negative ",?+=>"plus ",?*=>"times ",?/=>"divided by ").gsub(/(?<=^|[^t] )\d+|\d/){`echo "import Foundation
var f=NumberFormatter()
f.numberStyle = .spellOut
print(f.string(from:#$&)!)">.a
swift .a`.tr'-
',' '}

Try it online!
I must be mad to propose such a Frankenstein solution, but on one hand, it is very tempting to use Swift's built-in functionality for this task, and on the other hand, processing strings with Regexes in Swift looks to be a golfing catastrophe.
Therefore, I decided to do basic string processing in Ruby, but to spell out numbers, I store them in a Swift source file, run Swift in a shell command, and collect the output.
I turns out that Swift's "spellOut" number formatter does almost exactly what we need, except inserting unnecessary hyphens for two-digit numbers, as in twenty-two. In fact, even the floating point output in the format of integer part point digit digit... is good, but here comes the caveat - there is no infinite precision, and with large enough numbers or a lot of decimal digits, the results go wrong. Therefore, I had to separate the integer and fractional parts and to feed the fraction digit by digit.

This is absolutely diabolical and I love it.

sfk, 853 bytes
xed -i
"_*_ [part1]_"
+xed
_+_plus_
_\*_times_
"_/_divided by_"
"_- _minus _"
"_-_negative _"
+xed
"_,[keep][19 chars of 0-9,]_quadr@ _"
"_,[keep][15 chars of 0-9,]_tr@ _"
"_,[keep][11 chars of 0-9,]_b@ _"
"_,[keep][digits],[digits],_b@ _"
"_,[keep][digits],_m@ _"
"_,_ thousand _"
+xed
"_ 000[chars]@__"
"_ 000__"
"_ 00[keep][digit]_ _"
"_ 0[keep][2 digits]_ @_"
"_ [digit][keep][2 digits]_[part2]hundred @_"
"_ [ortext] 0[digit]0_ @[part2]_"
"_ [keep][2 digits]_ @_"
"_@_illion _"
+xed
_@11_eleven_
_@12_twelve_
_@1[digit]_@[part2]teen_
_@1_ten_
_@4_forty_
_@[digit]_@[part2]ty_
+xed
_@2_twen_
_@3_thir_
_@4_four_
_@5_fif_
_@6_six_
_@7_seven_
_@8_eigh_
_@9_nine_
+xed
"_0_ zero _"
"_1_ one _"
"_2_ two _"
"_3_ three _"
"_4_ four _"
"_5_ five _"
"_6_ six _"
"_7_ seven _"
"_8_ eight _"
"_9_ nine _"
"_._ point _"
+xed
"_[white]_ _"
+xed
"_[lstart] __"

Try it online!
Requires operators and numbers be separated by at least one space character.

Clean, 766 ... 687 bytes
import StdEnv,Text
m=""
z="zero"
@ =digitToInt
r=reverse
l k=(!!)k o@
^s=l[s:split" ""one two three four five six seven eight nine"]
g s=l[m,m,"twen","thir",s,"fif","six","seven","eigh","nine"]
~['0':t]= ~t
~[a,b,c]= ^""a+" hundred "+ ~[b,c]
~[b,c]|b>'1'=g"for"b+"ty "+ ^""c|c>'2'=g"four"c+"teen"=["ten","eleven","twelve"]!!(@c)
~[c]= ^""c
~_=m
$[]=m
$[x:y]#(h,t)=span(\e=e>'/'||e==',')if(x<'1')y[x:y]
=trim(join" "((case x of'0'=[z];'-'=["negative",$h];'.'=["point":map(^z)h];_=(r[u+v\\u<-r(map~(split[',']h))&v<-[m," thousand":[" "+k+"illion"\\k<-["m","b","tr","quadr"]]]|u>m]))++[?t]))
?['-':t]="minus "+ $t
?['+':t]="plus "+ $t
?['/':t]="divided by "+ $t
?['*':t]="times "+ $t
?t= $t

Try it online!
Expects a string without whitespace.

Python 2, 790 774 bytes
lambda T:B("([+/*-])",lambda m:dict(zip("+/*-",S("z"," plus z divided by z times z minus ")))[m.group(0)],B("([+/*-]|^)-",r"\1negative ",B("[^+/*-]+","{}",T))).format(*[J([g[int(S("\.",j)[0])]+S("z",B("y","illion","z thousandz myz byz tryz quadry"))[len(S(",",m))+~i]+(" point "+J(s[int(c)]for c in S("\.",j)[-1]))*("."in j)for i,j in E(S(",",m))if 0<float(j)+(m<"1")])for m in S("[+/*-]+",T)[T[0]=='-':]])
from re import*
E,S,B,P=enumerate,split,sub," ";J=P.join
s,e=S(P,"zero one two three four five six seven eight nine"),[B("urty","rty",j)for i,j in E(c+d for d in S(P,"teen ty")for c in S(P,"twen thir four fif six seven eigh nine"))]
g=s+S(P,"ten eleven twelve")+e[1:8]+[a+(P+b)*(i>0)for a in e[8:]for i,b in E(s)]
g=[(j+" hundred ")*(i>0)+k for i,j in E(s)for k in g]

Try it online!
So many bad practices. This almost hurt to write....
Expects a non-unicode string with no whitespace as input.
Explanation:
# import all functions from re (python regex library)
from re import*

# rename some repeatedly-used functions/variables for reduced bytecount
E,S,B,P=enumerate,split,sub," ";J=P.join

# list the names of 0-9
s=S(P,"zero one two three four five six seven eight nine")
# generate "twenteen" through nineteen and twenty though ninety, changing "fourty" to forty
# using enumerate (E) even though i is not required b/c it's shorter than range(len(x))
# using re.split (S) instead of string.split since it's shorter
e=[B("urty","rty",j)for i,j in E(c+d for d in S(P,"teen ty")for c in S(P,"twen thir four fif six seven eigh nine"))]
# generate 0-999
# 0-9
g=s+
   # 10, 11, 12
   +S(P,"ten eleven twelve")+
                            # remove "twenteen", 13-19
                            +e[1:8]+
                                   # tens' place + ones' place, if ones' place is not zero
                                   +[a+(P+b)*(i>0)                               ]
                                                   # for each tens' place in 20-90
                                                   for a in e[8:]
                                                                  # for each index, value in ones' places 0-9
                                                                  for i,b in E(s)

# hundreds' place if at least 100, plus tens' and ones' place (already calculated and stored in g from before)
g=[(j+" hundred ")*(i>0)+k                          ]
                           # (s) stores names for 0-9, need index to avoid "zero hundred"
                           for i,j in E(s)
                                          # for each hundred, iterate over all values (0-99) already in g
                                          for k in g

# actual function to call. uses previously declared global variable g.
def f(T):
    # gets the numbers in the supplied string (T) by splitting (T) on any operator character
    # remove first item if blank (only happens when staring with a - for negative numbers)
    n=S("[+/*-]+",T)[T[0]=='-':]

    # triply-nested set of re.subs to convert (T) to a sting of where the operators are replaced by their names and numbers are replaced by "{}"
    # EX: "-1-1--1" -> "-{}-{}--{}" -> "negative {}-{}-negative {}" -> "negative {} minus {} minus negative {}"
    # this sub happens last
    # re.sub (B) any operator, with the operators in a group "()" so that they return in match.group
    T=B("([+/*-])",                                                                                )
                  # an anonymous function to accept match objects (m) from re.sub's search.
                  ,lambda m:
                            # create a dictionary from the combination of operators and their names
                            # like {"+":" plus ",...}
                            # operator names are surrounded by spaces since number names are NOT
                            dict(zip("+/*-",S("z"," plus z divided by z times z minus ")))
                                                                                # from the constructed dictionary, select the operator matched by re.sub's search and return it for replacement
                                                                                [m.group(0)],
                                                                                # this substitution is second
                                                                                # re.sub (B) any operator followed by a minus (-), OR a minus at the beginning of the string
                                                                                # operators/start are grouped, trailing minus is not
                                                                                ,B("([+/*-]|^)-",                                    )
                                                                                # replace match with the grouped items plus the word "negative"
                                                                                # EX: "-1-1--1" -> "-{}-{}--{}" -> "negative {}-{}-negative {}"
                                                                                ,r"\1negative ",
                                                                                # this substitution is done first
                                                                                # replace any sequence of NON-operators with "{}"
                                                                                # this removes numbers so the names can be inserted later
                                                                                # EX: "-1-1--1" -> "-{}-{}--{}"
                                                                                ,B("[^+/*-]+","{}",T))

    # technically the previous construction of (T) and (n) can be placed here to save 5 bytes but my poor eyes can't handle that.
    # insert constructed names back into original string.
    # EX: "-1-1--1" -> "negative {} minus {} minus negative {}" -> "negative one minus one minus negative one"
    print T.format(                                                                                )
                   # string.format needs items in array unpacked, or it will attempt to insert the string representation of the array itself
                   *[                                                                                ]
                     # for each number pulled from (T), generate names and join generated items back together with spaces
                     # EX: "1,456" -> ["1", "456"] -> ["one thousand", "four hundred fifty six"] -> "one thousand four hundred fifty six"
                     J(                                                                                )for m in n
                       # split j on periods (.) and take the first item
                       # convert that item into an integer and find the item at that index in g (0-999)
                       [g[int(S("\.",j)[0])]+                                                                                ]
                                            # insert prefix for millions +, split string on "z" (spaces must be preserved for proper separation)
                                            +S("z",B("y","illion","z thousandz myz byz tryz quadry"))
                                                                                # left is largest, so take the item at index (total # of groups - current place - 1)
                                                                                [len(S(",",m))+~i]+
                                                                                # if group had a period, split string on period and take last item
                                                                                # replace every character in group with number 0-9 name
                                                                                # join them with spaces and add back to rest of group
                                                                                +(" point "+J(s[int(c)]for c in S("\.",j)[-1]))*("."in j)
                                                                                # split number into groups by comma
                                                                                # EX: "123,456" -> ["123","456"]
                                                                                # only return item if j != 0 (avoids returning empty string which will result in too many joined spaces)
                                                                                # OR if m == 0 (avoids not returning anything when should return "zero")
                                                                                for i,j in E(S(",",m))if 0

I reduced by about 150 bytes while writing the explanation. Let it never be said that commenting/reviewing your code isn't helpful!

05AB1E, 315 295 282 276 bytes
"+-*/"DˆS¡εDõQi'¢…ë'.¡VYнD_i\'¡×ðë',¡DgUε0›i.•6b©•ð“†ìˆÈŒšï¿Ÿ¯¥Š“©'tKJ#'…§«…€µ‚•„í#®#«…—¿áÓÁÏ#«ìD9£©.•4º»Ÿć'Rþн•ŽH$S£“Œšï¿Ÿ¯¥Š“'tK#«„ty«sõšâðý«õšD®'°¡ðì«sâðý«yèð.•cG3₅¦„¥F•8ô'¾ß«…¡›‡È±°#«õªRXN-<èJëõ}}ðý}Yg<i®'¡×šYθSè'…®šðý}}J}s¯`Ãε“‰´Øè„Æºß“#¤… by«¸s¨ì¯`ykè}.ιðý„  ð:„¢…Øè'¢…:

Takes input without any spaces.
Try it online or verify all test cases.
Explanation:
"+-*/"                    # Push string "+-*/"
Dˆ                        # Duplicate it, pop the copy, and push it to the global array
S¡                        # Split the input by any "+", "-", "*", or "/"
ε                         # Map each number to:
 DõQi                     #  If the item is empty (happens for negative numbers)
     '¢…                 '#   Push string "negative"
 ë                        #  Else:
  '.¡                    '#   Split by "."
  VY                      #   Store it in variable `Y`
  н                       #   Take the first number (the integer part)
  D                       #   Duplicate this integer part
  _i                      #   If the integer part is exactly 0:
    \                     #    Discard the duplicated integer part
    '¡×                  '#    Push string "zero"
    ð                     #    Push a space " "
  ë                       #   Else:
   ',¡                   '#    Split by ","
   DgU                    #    Pop and store the amount of items in variable `X`
      ε                   #    Map each part to:
       0›i                #     If it's larger than 0:
          .•6b©•          #      Push string "thir"
          ð               #      Push a space " "
          “†ìˆÈŒšï¿Ÿ¯¥Š“  #      Push string "four five six seven eight nine"
          ©               #      Store it in the register (without popping)
           'tK           '#      Remove all "t" (so "eight" becomes "eigh")
          J               #      Join it together with the "thir" and space
          #               #      Split by spaces
          '…§            '#      Push string "teen"
             «            #      And append it to every string in the list
                          #      (We now have ["thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"])
          …€µ‚•„í         #      Push string "one two three"
                 #        #      Split by spaces
          ®               #      Push the string from the register ("four" through "nine")
           #«             #      Split by spaces, and merge both lists together
          …—¿áÓÁÏ         #      Push string "ten eleven twelve"
                 #«       #      Split by spaces, and also merge both lists together
          ì               #      Prepend "one" through "twelve" before "thirteen" through "nineteen"
          D9£             #      Duplicate it, and take the first nine ("one" through "nine")
             ©            #      Store it in the register (without popping)
          .•4º»Ÿć'Rþн•   '#      Push string "twenthirforfif"
          ŽH$             #      Push integer 4433
             S            #      Split to digits: [4,4,3,3]
              £           #      And split the to parts of that size: ["twen","thir","for","fif"]
          “Œšï¿Ÿ¯¥Š“      #      Push string "six seven eight nine"
                    'tK  '#      Remove all "t" (so "eight" becomes "eigh")
                       #« #      Split by spaces, and merge both lists together
          „ty             #      Push string "ty"
             «            #      And append it to every string in the list
                          #      (We now have ["twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"])
          s               #      Swap so the list "one" through "nine" is at the top again
           õš             #      Prepend an empty string to that list
             â            #      Create every possible pair of "one" through "nine" with "twenty" through "ninety"
              ðý          #      Join each pair with a space delimiter
          «               #      Merge the "twenty" through "ninety nine" list with "one" through "nineteen"
           õš             #      Prepend an empty string to that list
          D               #      Duplicate the entire list
          ®               #      Push the string from the register ("one" through "nine")
          '°¡            '#      Push string "hundred"
             ðì           #      Prepend it with a space " "
               «          #      Append it to every string in the list
                          #      (We now have ["one hundred","two hundred",...,"nine hundred"])
          s               #      Swap the two lists
           â              #      Create every possible pair of "one hundred" through "nine hundred" with "" through "ninety nine"
            ðý            #      Join each pair with a space delimiter
              «           #      Merge the "one" through "ninety nine" with "one hundred " through "nine hundred ninety nine"
                          #      (We now have ["","one",...,"nine hundred ninety nine"])
          y               #      Get the current number of the map
           è              #      And index it into this list
          ð               #      Push a space " "
          .•cG3₅¦„¥F•     #      Push string "quadrilltrill"
                     8ô   #      Split into pieces of size 8: ["quadrill","trill"]
          '¾ß            '#      Push string "ion"
             «            #      Append it to every string in the list
          …¡›‡È±°         #      Push string "billion million thousand"
                 #        #      Split by spaces
                  «       #      And merge both lists together
          õª              #      Append an empty string
            R             #      Reverse the list
                          #      (We now have ["","thousand","million","billion","trillion","quadrillion"])
          X               #      Push variable `X`
           N-             #      Subtract the map-index from it
             <            #      Subtract an additional 1
              è           #      And index it into the list
          J               #      Join the stack together
       ë                  #     Else:
        õ                 #      Push an empty string ""
       }                  #     Close the if-else
      }                   #    Close the map
      ðý                  #    Join the mapped values with space delimiter
  }                       #   Close the if-else
  Y                       #   Push variable `Y`
  g<i                     #   If its length is exactly 2:
     ®                    #    Push the string from the register ("one" through "nine")
     '¡×                 '#    Push "zero"
        š                 #    Prepend it to the list
      Yθ                  #    Push variable `Y` again, and leave the second number (the decimal part)
        S                 #    Split it to digits
         è                #    And index each into the list
      '…®                '#    Push string "point"
         š                #    Prepend it in front of that list
      ðý                  #    Join the list with space delimiter
  }                       #   Close the if
 }                        #  Close the if-else
 J                        #  Join the stack together
}                         # Close the map
s                         # Swap to take the (implicit) input again
¯`                        # Push the global array, and dump it's content (string "+-*/")
  Ã                       # Only keep all "+", "-", "*", and "/", and remove everything else
ε                         # Map each to:
 “‰´Øè„Æºß“               #  Push string "plus minus times divided"
           #              #  Split by spaces
 ¤                        #  Take the last item (without popping the list)
  … by«                   #  Append it with string " by"
       ¸                  #  Wrap it to a list: ["divided by"]
 s                        #  Swap to take the list again
  ¨                       #  Remove the last item
   ì                      #  Prepend it in front of the list: ["plus","minus","times","divided by"]
 ¯`                       # Push the global array, and dump it's content (string "+-*/")
   yk                     #  Push the index in this string for the current map-value `y`
     è                    #  And use that index to index into the string-list
}                         # Close the map
.ι                        # Interweave the list of numbers and list of operators
  ðý                      # Join everything with space delimiter
„  ð:                     # Replace every two spaces for a single space
„¢…Øè'¢…:                '# And replace every "negative minus" with "negative"
                          # (and output the result implicitly)

See this 05AB1E tip of mine (sections How to use the dictionary?, How to compress strings not part of the dictionary?, and How to compress large integers?) to understand why:

(How to use the dictionary?) -- '¢… is "negative"; '¡× is "zero"; “†ìˆÈŒšï¿Ÿ¯¥Š“ is "four five six seven eight nine"; '…§ is "teen"; …€µ‚•„í is "one two three"; …—¿áÓÁÏ is "ten eleven twelve"; '°¡ is "hundred"; '¾ß is "ion"; …¡›‡È±° is "billion million thousand"; '…® is "point"; and “‰´Øè„Æºß“ is "plus minus times divided".
(How to compress strings not part of the dictionary?) -- .•6b©• is "thir"; .•4º»Ÿć'Rþн• is "twenthirforfif"; and .•cG3₅¦„¥F• is "quadrilltrill".
(How to compress large integers?) -- ŽH$ is 4433.


text:
Partitioning the grid into triangles
Goal
The goal of this challenge is to produce a function of n which computes the number of ways to partition the n X 1 grid into triangles where all of the vertices of the triangles are on grid points.
Example
For example, there are 14 ways to partition the 2 x 1 grid, so f(2) = 14 via the following partitions
where the partitions have 2, 2, 2, 2, 4, and 2 distinct orientations respectively.
Scoring
This is code-golf, so shortest code wins.

Some additional test cases would be beneficial, so we can verify our submissions are correct.

You may want to specify non-degenerate triangles.

I've made edits to OEIS sequence A051708 to reflect this interpretation.

05AB1E, 13 bytes
·LÉœÙεÅγo;P}O

Port of @Bubbler's Jelly answer.
Very slow due to the permutations builtin.
Try it online or verify the first four inputs.
Explanation:
·                # Double the (implicit) input
 L               # Create a list in the range [1, doubled_input]
  É              # Check for each if they're odd (1 if truthy, 0 is falsey)
                 # We now have a list of n 0s and n 1s (n being the input)
   œ             # Get all permutations of that list
    Ù            # Only leave the unique permutations
     ε     }     # Map each permutation to:
      Åγ         #  Run-length encode the current value (short for `γ€g`)
        o        #  Take 2 to the power for each
         ;       #  Halve each
          P      #  Take the product of the mapped permutation
            O    # Sum all mapped values together (and output implicitly)

Haskell, 60 55 54 52 bytes
After a drawing and programming a lot of examples, it occured to me that this is the same as the problem of the rooks:

On a \$(n+1) \times (n+1)\$ chessboard, how many ways are there for a rook to go from \$(0,0)\$ to \$(n,n)\$ by just moving right \$+(1,0)\$ or up \$+(0,1)\$?

Basically you have the top and the bottom line of the \$1 \times n\$ grid. Now you have to fill in the non-horizontal line. Each triangle must have two non-horizontal lines. Whether one of its sides is part of the top or the bottom line corresponds to the direction and length you'd go in the rooks problem. This is OEIS A051708. As an illustration of this correspondence consider following examples. Here the top line corresponds to up-moves, while the bottom line corresponds to right-moves.

Thanks @PeterTaylor for -6 bytes and @PostLeftGarfHunter for -2 bytes!
b 0=1
b 1=2
b n=div((10*n-6)*b(n-1)-9*(n-2)*b(n-2))n

Try it online!

I found the OEIS sequence by searching with the first few values. Nice explanation for why it matches. Do you want to edit it to add a comment about this alternative combinatorial interpretation? If not, I might.

BTW you need to adjust the indexing, because the correct answer here is A051708(n+1). So I posted the first correct answer :-P

I take it the rook moves map to triangles by making triangles with top and bottom edges correspond to up or right moves?

@PeterTaylor Damn, thanks for pointing out my mistake :)

@Neil I added a graphical explanation.

@PeterTaylor Please go ahead editing the OEIS:)

@PostLeftGarfHunter D'oh, I was so used to doing that I completely forgot, thanks for reminding me:)

Haskell, 42 bytes
0?0=1
a?b=sum[a?i+i?a|i<-[0..b-1]]
f n=n?n

Try it online!
A fairly direct implementation that recurses over 2 variables.
Here's how we can obtain this solution. Start with code implementing a direct recursive formula:
54 bytes
0%0=1
a%b=sum$map(a%)[0..b-1]++map(b%)[0..a-1]
f n=n%n

Try it online!
Using flawr's rook move interpretation ,a%b is the number of paths that get the rook from (a,b) to (0,0), using only moves the decrease a coordinate. The first move either decreases a or decreases b, keeping the other the same, hence the recursive formula.
49 bytes
a?b=sum$map(a%)[0..b-1]
0%0=1
a%b=a?b+b?a
f n=n%n

Try it online!
We can avoid the repetition in map(a%)[0..b-1]++map(b%)[0..a-1] by noting that the two halves are the same with a and b swapped. The auxiliary call a?b counts the paths where the first move decreases a, and so b?a counts those where the first move decreases b. These are in general different, and they add to a%b.
The summation in a?b can also be written as a list comprehension a?b=sum[a%i|i<-[0..b-1]].
42 bytes
0?0=1
a?b=sum[a?i+i?a|i<-[0..b-1]]
f n=n?n

Try it online!
Finally, we get rid of % and just write the recursion in terms of ? by replacing a%i with a?i+i?a in the recursive call.
The new base case causes this ? to give outputs double that of the ? in the 49-byte version, since with 0?0=1, we would have 0%0=0?0+0?0=2. This lets use define f n=n?n without the halving that we'd other need to do.

Your 49-byte solution uses the same recursion as my answer, but I haven't yet figured out the 42-byte one. An explanation would be nice.

I think I used the same approach in one of my earlier programs: The idea is generating (or counting) all partitions by generating the non-horizontal lines from right to left. You start out with the vertical line. Then you can recurse: Take one of the end nodes of the previous line and connect it to a node on the opposite horizontal line that is farther to the left of all previous nodes on this line.

The operator a%b counts the number of partitions using the nodes 0,1,...,a on the top line, and the nods 0,1,..,b on the bottom line. The operator a?b counts the number of ways you can add a new line from the top node a if the bottom node b is already in use. (You can connect a to all of the nodes [0,1,...,b-1], but you then have to recurse for each of those.)

@flawr, that's the 49-byte one, which I understand. It's the ? of the 42-byte one which I don't, and what's particularly curious is that it's not symmetric.

@PeterTaylor Sorry for the confusion, I somehow mixed up the two solutions. I think we can quite easily transform the two solutions into eachother: In the first step we can replace map... with a list comprehension, in the second step we just plug in the definition of %: a?b=sum$map(a%)[0..b-1], a%b=a?b+b?a $ \iff $ a?b=sum[a%i|i<-[0..b-1]], a%b=a?b+b?a $ \iff $ a?b=sum[a?i+i?a|i<-[0..b-1]]

@flawr, a%b is (quite obviously) equal to b%a, but a?b is not equal in general to b?a, so I'm not convinced by the transformation.

@PeterTaylor I do not think I've used that in the transformations above, or did I? (And from my intuition I think a?b shouldn't be equal to b?a.) A mistake I just spotted in my transformation is about the anchor that I ignored.

@PeterTaylor flawr's derivation is right, I added a more detailed explanation.

CJam (24 bytes)
{2,*e!{e`0f=:(1b2\#}%1b}

Online demo
This uses Bubbler's approach of summing over permutations of n 0s and n 1s.
Dissection
{         e# Define a block
  2,*     e#   Given input n, create an array of n 0s and n 1s
  e!      e#   Generate all permutations of that array
  {       e#   Map:
    e`    e#     Run-length encode
    0f=:( e#     Extract just the lengths and decrement them
    1b    e#     Sum
    2\#   e#     Raise 2 to the power of that sum
  }%
  1b      e#  Sum the mapped values
}

Alternative approach (28 bytes)
{_1aa{_2$,f{j}@@,f{j}+1b}2j}

Online demo
Dissection
The triangles all have one horizontal edge and two edges which link the horizontal lines. Label the non-horizontal edges by a tuple of their two x-coords and sort lexicographically. Then the first edge is (0,0), the last edge is (n,n), and two consecutive edges differ in precisely one of the two positions. This makes for a simple recursion, which I've implemented using the memoised recursion operator j:
{            e# Define a block
  _          e#   Duplicate the argument to get n n
  1aa        e#   Base case for recursion: 0 0 => 1
  {          e#   Recursive body taking args a b
    _2$,f{j} e#     Recurse on 0 b up to a-1 b
    @@,f{j}  e#     Recurse on a 0 up to a b-1
    +1b      e#     Combine and sum
  }2j        e#   Memoised recursion with 2 args
}

Note
This is not the first time I've wanted fj to be supported in CJam. Here it would bring the score down to 24 bytes also. Perhaps I should try to write a patch...

Yay, I beat you by 10 seconds, I don't think I was ever that close :)

@flawr, I did consider posting before writing a dissection, but I thought I had time to knock it out quickly. Then I saw "New answer", so I deleted my part-written dissection, posted, and edited.

Thanks for -5 bytes btw :D

Charcoal, 44 31 bytes
crossed out 44 is still regular 44
Ｆ⊕θ«≔⟦⟧ηＦ⊕θ⊞ηΣ∨⁺ηＥυ§λκ¹⊞υη»Ｉ⊟⊟υ

Try it online! Explanation: Works by calculating the number of ways to partition a trapezium of opposite side lengths m,n into triangles which all lie on integer offsets. This is simply a general case of the rectangle of size n in the question. The number of partitions is given recursively as the sums of the numbers of partitions for all sides m,0..n-1 and n,0..m-1. This is equivalent to generalised problem of the rooks, OEIS A035002. The code simply calculates the number of partitions working from 0,0 up to n,n using the previously calculated values as it goes.
Ｆ⊕θ«

Loop over the rows 0..n.
≔⟦⟧η

Start with an empty row.
Ｆ⊕θ

Loop over the columns in the row 0..n.
⊞ηΣ∨⁺ηＥυ§λκ¹

Take the row so far and the values in the previous rows at the current column, and add the sum total to the current row. However, if there are no values at all, then substitute 1 in place of the sum.
⊞υη»

Add the finished row to the list of rows so far.
Ｉ⊟⊟υ

Output the final value calculated.

Jelly, 15 14 bytes
Ø.xŒ!QŒɠ€’§2*S

Try it online!
-1 byte based on Peter Taylor's comment.
Uses flawr's illustration directly, instead of the resulting formula.
How it works
Ø.xŒ!QŒɠ€’§2*S    Main link (monad). Input: positive integer N.
Ø.x               Make an array containing N zeros and ones
   Œ!Q            All unique permutations
      Œɠ€         Run-length encode on each permutation
         ’§       Decrement and sum each
           2*S    Raise to power of 2 and sum

Take every possible route on a square grid. The number of ways to move L units in one direction as a rook is 2**(L-1). Apply this to every route and sum the number of ways to traverse each route.

Nice approach. When I ported it to CJam it was shorter to decrement the lengths, sum, and then raise 2 to the sum; rather than raising 2 to the length, halving, and then multiplying. Don't know whether it might save you a byte.

JavaScript (ES6),  45 44  42 bytes
Uses the recursive formula found by Peter Taylor and flawr.
f=n=>n<2?n+1:(10-6/n)*f(--n)+9/~n*f(--n)*n

Try it online!

Pari/GP, 43 bytes
According to OEIS, the generating function of this sequence is
$$\frac{1}{2}\left(\sqrt{\frac{1-x}{1-9x}}+1\right)$$
n->Vec(sqrt((1-x)/(1-9*x)+O(x^n++))+1)[n]/2

Try it online!

Python 3, 51 bytes
lambda n:-~n*(n<2)or(10-6/n)*f(n-1)-(9-18/n)*f(n-2)

Try it online!
Port of flawr's answer


text:
Convert an Excel date code to a "date"
Given a non-negative integer Excel-style date code, return the corresponding "date" in any reasonable form that clearly shows year, month, and "day".
Trivial, you may think. Did you notice the "scare quotes"? I used those because Excel has some quirks. Excel counts days with number 1 for January 1st, 1900, but as if 1900 had a January 0th and a February 29th, so be very careful to try all test cases:
 Input → Output (example format)
     0 → 1900-01-00    Note: NOT 1899-12-31
     1 → 1900-01-01
     2 → 1900-01-02
    59 → 1900-02-28
    60 → 1900-02-29    Note: NOT 1900-03-01
    61 → 1900-03-01
   100 → 1900-04-09
  1000 → 1902-09-26
 10000 → 1927-05-18
100000 → 2173-10-14

Does every year have a 0th of January and 29th of February or is 1900 the only anomaly?

1900 is the anomaly.  Excel treats leap years correctly except for 1900 (which is not a leap year).  But that was for compatibility with Lotus 1-2-3, where the bug originated.

@Shaggy Only 1900 is anomalous.

@RickHitchcock Apparently, the Lotus 1-2-3 devs did it to save on leap year code, such that the rule simply became every fourth year. With good reason too; 1900 was far in the past, and 2100 is, well, in a while.

If 1900 is the only anomaly in Excel, but Lotus 1-2-3 treated all years divisible by 4 as leap years, then you have to wonder why Microsoft decided to make that one exception.  (But every day I ask why Microsoft made some inane decision.)

@RickHitchcock It may very well be that the original Lotus 1-2-3 couldn't handle Y2K, and so Microsoft decided to mimic that one issue, but otherwise stay right. Btw, the legacy lives on: .NET's OADate has epoch 1899-12-30 so that it will line up with Excel on all but the first two months of 1900, however this necessitates the DayOfWeek method because the original epoch, 1899-12-30 (or the fictive 1900-01-00) was chosen such that the weekday simply was the mod-7 of the day number, but that won't work with 1899-12-30.

Here's the story behind the "why" about Excel dates: Joel on Software: My First BillG Review. Informative (and entertaining) read.

Excel, 3(+7?)
=A1

with format
yyy/m/d

Pure port

The output format may of course vary according to your locale.

This only works on Excel for Windows.  Excel for a Mac has a number system that starts with dates in 1904, not 1900.  It will not report a date for any year in 1900, which are part of the test cases.  You may want to specify that this is Excel for Windows.

@Keeta For this to work on Excel for Mac, simply uncheck "Use 1904 date system" in preferences.

@BradC Although true, any change to the default configuration of a program is perfectly fine BUT must be included in the answer.  I comment this as a point to improve the answer.  I would say either switch the name of it to Excel for Windows, add the caveat, or switch to OpenOffice Calc (or similar, since they purposefully included the bug, too).  https://codegolf.meta.stackexchange.com/questions/10037/bytes-for-changing-a-configuration-file-before-running-a-program

k (kdb+ 3.5), 55 54 51 50 bytes
{$(`1900.01.00`1900.02.29,"d"$x-36526-x<60)0 60?x}

to test, paste this line in the q console:
k)-1@{$(`1900.01.00`1900.02.29,"d"$x-36526-x<60)0 60?x}'0 1 2 59 60 61 100 1000 10000 100000;

the output should be
1900.01.00
1900.01.01
1900.01.02
1900.02.28
1900.02.29
1900.03.01
1900.04.09
1902.09.26
1927.05.18
2173.10.14

{ } is a function with argument x
0 60?x index of x among 0 60 or 2 if not found
ˋ1900.01.00ˋ1900.02.29 a list of two symbols
, append to it
"d"$ converted to a date
x-36526 number of days since 1900 (instead of the default 2000)
- x<60 adjust for excel's leap error
(ˋ1900.01.00ˋ1900.02.29,"d"$x-36526-x<60)@0 60?x juxtaposition means indexing - the "@" in the middle is implicit
$ convert to string

For a different version of k (k5/k6, I think), {$[x;$`d$x-65746;"1900.01.00"]} seems to work. I assume something overflows somewhere for 100000.

@zgrep You should post since versions of K basically are entirely dissimilar languages.

JavaScript (ES6),  89 82  77 bytes
Saved  7  12 bytes thanks to @tsh
n=>(p=n>60?'':19)+new Date(p*400,0,n-!p||1).toJSON().slice(p/9,10-!n)+(n&&'')

Try it online!

n=>n?n-60?new Date(1900,0,n-(n>60)).toJSON().slice(0,10):'1900-02-29':'1900-01-00'

@tsh That's much better indeed. Thanks. (Also, I wonder if this approach could somehow be golfed.)

I just find out new Date(0,0,1) is same as new Date(1900,0,1). So remove 190 saves 3 bytes. And...

77 bytes: n=>(p=n>60?'':19)+new Date(p*400,0,n-!p||1).toJSON().slice(p/9,10-!n)+(n&&'')

Does it need to be run in GMT0/-x?

@tsh Very clever hacks in there!

@l4m2 Yes. And TIO happened to be configured in UTC timezone.

Python 2, 111 bytes
from datetime import*
n=input()
print('1900-0'+'12--0209'[n>9::2],date(1900,1,1)+timedelta(n+~(n>59)))[0<n!=60]

Try it online!
-5 thanks to ngn.

Note: I'm pretty sure this will turn out to be longer as a lambda, since the format of the result shouldn't vary.

Clean, 205 189 bytes
import StdEnv
a=30;b=31;c=1900;r=rem
@m=sum(take m(?c))
?n=[b,if(n>c&&(r n 4>0||r n 100<1&&r n 400>0))28 29,b,a,b,a,b,b,a,b,a,b: ?(n+1)]
$n#m=while(\m= @m<n)inc 0-1
=(c+m/12,1+r m 12,n- @m)

Try it online!

First answer that doesn't use built-in date handling. Nice!

APL (Dyalog Classic), 31 bytes
Anonymous tacit prefix function. Returns date as [Y,M,D]
(¯3↑×-60∘≠)+3↑2⎕NQ#263,60∘>+⊢-×

Try it online!
× sign of the date code
⊢- subtract that from the argument (the date code)
60∘>+ increment if date code is above sixty
2⎕NQ#263, use that as immediate argument for "Event 263" (IDN to date)
 IDN is just like Excel's date code, but without Feb 29, 1900, and the day before Jan 1, 1900 is Dec 31, 1899
3↑ take the first three elements of that (the fourth one is day of week)
(…)+ add the following to those:
 60∘≠ 0 if date code is 60; 1 if date code is not 60
 ×- subtract that from the sign of the date code
 ¯3↑ take the last three elements (there is only one) padding with (two) zeros
developed together with @Adám in chat

Japt, 43 bytes
Ended up with a part port of Arnauld's solution.
Output is in yyyy-m-d format.
?U-#<?Ð#¾0TUaU>#<)s7:"1900-2-29":"1900-1-0"

Try it online or test 0-100

C# (.NET Core), 186 185 bytes
using System;class P{static void Main(){var i=int.Parse(Console.ReadLine());Console.Write((i==0|i==60)?$"1900-{i%59+1}-{i%31}":DateTime.FromOADate(i+(i<60?1:0)).ToString("yyyy-M-d"));}}

Try it online!

-1 byte by replacing OR operator(||) with binary OR operator(|).

Perl 6, 81 bytes
{$_??$_-60??Date.new-from-daycount($_+15018+(60>$_))!!'1900-02-29'!!'1900-01-00'}

Try it online!

T-SQL, 141 95 94 bytes
SELECT IIF(n=0,'1/0/1900',IIF(n=60,'2/29/1900',
FORMAT(DATEADD(d,n,-IIF(n<60,1,2)),'d')))FROM i

Line break is for readability only.
Input is taken via pre-existing table i with integer field n, per our IO standards.
SQL uses a similar (but corrected) 1-1-1900 starting point for its internal date format, so I only have to offset it by 1 or 2 days in the DATEADD function.
SQL can't output a column containing a mix of date and character values, so I can't leave off the FORMAT command (since it would then try to convert 1/0/1900 to a date, which is of course invalid).
What's nice about SQL is that I can load up all the input values into the table and run them all at once. My (US) locality defaults to a m/d/yyyy date format:
n       output
0       1/0/1900
1       1/1/1900
2       1/2/1900
59      2/28/1900
60      2/29/1900
61      3/1/1900
100     4/9/1900
1000    9/26/1902
10000   5/18/1927
43432   11/28/2018
100000  10/14/2173

EDIT: Saved 46 bytes by changing to a nested IIF() instead of the much more verbose CASE WHEN.
EDIT 2: Saved another byte by moving the - in front of the IIF.


text:
Given an input, print all exponents where the base and power sum to the input
So this is my first challenge on this site.
The challenge is to take in an input integer \$n\$, which will be positive, and print, in ascending order (\$1\$ to \$n\$, including n), the output of \$i^{(n-i)}\$ (where \$i\$ is the current integer).
Example
Given the input 5, the program will print:
1
8
9
4
1

\$1^4\$ is 1 and \$1+4=5\$
\$2^3\$ is 8 and \$2+3=5\$
\$3^2\$ is 9 and \$3+2=5\$
\$4^1\$ is 4 and \$4+1=5\$
\$5^0\$ is 1 and \$5+0=5\$
Input and Output
Input will be in the form of a positive integer.
Output will be a list of numbers, delimited by either commas or new lines.
This is code-golf, so shortest code wins.

the comma/newline detail should be omitted, it is normal practice around here to let output of lists be in any convenient format, including as a list/array object being returned by a function

Is the input always greater than 0 or do we have to deal with 0 and negatives?

Inputs will always be positive

Two equally short answers doesn't matter. If you feel like accepting an answer, choose the earliest posted one. However I strongly recommend waiting at least a few days, and would suggest never accepting an answer (to encourage more submissions).

Are we allowed to start with 0^n or must we start at 1?

Shouldn't the title be "Given an integer, print all the powers obtained with a base and an exponent that sum to the input"?

is a trailing comma at the end of the output allowed?

You can have a trailing comma, since it doesn't interfere with the primary objective

@NicolaSap Should probably also be a positive integer.

APL (Dyalog Unicode), 8 5 bytes
⍳*⊢-⍳

Try it online!
Anonymous prefix tacit function. TIO tests for the range [1..10].
Thanks @lirtosiast for 3 bytes.
How:
⍳*⊢-⍳ ⍝ Tacit function
    ⍳ ⍝ Range. ⍳n generates the vector [1..n].
  ⊢- ⍝ Subtracted from the argument. The vector is now [n-1,n-2,...,0]
⍳*    ⍝ Exponentiate using the range [1..n] as base. The result is the vector
      ⍝ [1^(n-1), 2^(n-2), 3^(n-3),...]

⍳*⊢-⍳ is 5 bytes, using ⎕IO←1.

@lirtosiast took me a while to figure out why does that work, but I got it. Thanks.

Perl 6, 19 bytes
{^$_+1 Z**[R,] ^$_}

Try it online!
Anonymous code block that takes a number and returns a list. Zip exponents the range 1 to input and the range input-1 to 0

Haskell, 23 bytes
f i=[x^(i-x)|x<-[1..i]]

Try it online!
Alternative version, also 23 bytes:
f i=(^)<*>(i-)<$>[1..i]

Aheui (esotope), 193 164 bytes (56 chars)
방빠싹받분샥퍼붇바파쟈뿌차샦히망맣여
타빠바푸투반또분뽀뿌서썪삯타삯받반타
석차샦져쌲볼어타토싻삭빠쏛ㅇ또섞썪뻐

Try it online!
Try it on AVIS(Korean); just copy and paste code above, press start button, input a number, see how it moves. To see output, press the >_ icon on left side.

It's not golfed much, but I give it a shot.

Is it possible to chose a character set, so that each character is stored in 2 bytes?

@tsh According to Aheui specification, an Aheui code consists of only UTF-8 characters.

Japt, 5 bytes
õ_p´U

Try it
õ         :Range [1,input]
 _        :Map
  p       :  Raise to the power of
   ´U     :  Input decremented

Pyth, 5 bytes
_m^-Q

Try it online!
Optimally encoded this would be 4.106 bytes.
_                reverse of the following list:
 m               map the following lambda d:
  ^                (N-d)**d
   -Qd
      d
       Q         over [0,...,N-1]

J, 10 bytes
(>:^|.)@i.

Try it online!
If we really need to separate the numbers by a newline:
J, 13 bytes
,.@(>:^|.)@i.

Try it online!

Jelly, 5 bytes
R*ḶU$

Try it online!
R                [1,...,n]
 *               to the power of
  ḶU$            [0,...,n-1] reversed

Octave, 18 bytes
@(n)(t=1:n).^(n-t)

Try it online!
Thanks Luis Mendo, using internal variable saves 3 bytes.

PHP, 32 bytes
while($argn)echo++$i**--$argn,_;

Run as pipe with -nR or try it online.

Jelly, 4 bytes
*ạ¥€

Try it online!

JavaScript (Node.js), 33 32 bytes
n=>(g=i=>--n?++i**n+[,g(i)]:1)``

Try it online!
-3 bytes with credits to @Shaggy, and -1 byte by @l4m2!
JavaScript (Node.js), 36 bytes
f=(n,i=1)=>n--?[i++**n,...f(n,i)]:[]

Try it online!
JavaScript (Node.js), 37 bytes
n=>[...Array(n)].map(x=>++i**--n,i=0)

Try it online!

33 bytes

32

Wolfram Language (Mathematica), 24 20 18 bytes
(x=Range@#)^(#-x)&

Try it online!
-4 thanks @lirtosiast.

MathGolf, 6 bytes
rx\╒m#

Try it online!

I have implemented reverse subtraction, multiplication and division, but it looks like a reverse power operator could come in handy?

Python 2, 40 bytes
lambda n:[i**(n-i)for i in range(1,n+1)]   #Outputs a list

Try it online!
Python 2, 41 bytes
n,i=input(),0
exec"print(n-i)**i;i+=1;"*n   #Prints in reversed order

Try it online!

Ruby, 27 bytes
->n{(1..n).map{|r|r**n-=1}}

Try it online!

QBasic, 3533 bytes
Thank you @Neil for 2 bytes!
INPUT a
FOR b=1TO a
?b^(a-b)
NEXT

Slightly expanded version on REPL.IT because the interpreter in't entirely up-to-spec.
Output
QBasic (qb.js)
Copyright (c) 2010 Steve Hanov

   5
1
8
9
4
1

Save 2 bytes by outputting the list in the correct order! (b^(a-b) for b=1..a)

@Neil Thanks, I've worked it in!

Retina, 35 bytes
.+
*
_
$$.($.'*$($.>`$*)_¶
%~`^
.+¶

Try it online! Explanation:
.+
*

Convert the input to unary.
_

Match each position. This then sets several replacement variables. $` becomes the left of the match; $>` modifies this to be the left and match; $.>` modifies this to take the length, i.e. the current index. $' meanwhile is the right of the match, so $.' is the length i.e. the current exponent.
$$.($.'*$($.>`$*)_¶

Create a string $.( plus $.' repetitions of $.>`* plus _. For an example, for an index of 2 in an original input of 5, $.' is 3 and $.>` is 2 so the resulting string is $.(2*2*2*_. This conveniently is a Retina replacement expression that caluclates 2³. Each string is output on its own line.
%~`^
.+¶

For each line generated by the previous stage, prefix a line .+ to it, turning it into a replacement stage, and evaluate that stage, thereby calculating the expression.

F# (.NET Core), 42 bytes
let f x=Seq.map(fun y->pown y (x-y))[1..x]

Try it online!

Java, 59 Bytes
for(int i=1;a+1>i;i++)System.out.println(Math.pow(i,a-i));

Welcome to PPCG. It looks like this requires "input" be assigned to the predefined variable a, which we don't allow.

Hello, here's a fix for you: n->{for(int i=0;i++<n;)System.out.println(Math.pow(i,n-i));} 60 bytes (code and test cases in the link)

C# (Visual C# Interactive Compiler), 46 bytes
x=>new int[x].Select((_,i)=>Math.Pow(i+1,--x))

Try it online!

MATL, 5 bytes
:Gy-^

Try it online!
Explanation
Consider input 5 as an example.
:     % Implicit input. Range
      % STACK: [1 2 3 4 5]
G     % Push input again
      % STACK: [1 2 3 4 5], 5
y     % Duplicate from below
      % STACK: [1 2 3 4 5], 5, [1 2 3 4 5]
-     % Subtract, element-wise
      % STACK: [1 2 3 4 5], [4 3 2 1 0]
^     % Power, element-wise. Implicit display
      % STACK: [1 8 9 4 1]

Clean, 37 bytes
import StdEnv
$n=[i^(n-i)\\i<-[1..n]]

Try it online!
Defines $ :: Int -> [Int] taking an integer and returning the list of results.
$ n                // function $ of n
 = [i ^ (n-i)      // i to the power of n minus i
    \\ i <- [1..n] // for each i in 1 to n
   ]

R, 34 bytes
x=1:scan();cat(x^rev(x-1),sep=',')

Try it online!

Is the default "sep" not a space? Would that not work?

@stuartstevenson "Output will be a list of numbers, delimited by either commas or new lines."

Lua, 43 41 bytes
-2 bytes thanks to @Shaggy
s=io.read()for i=1,s do print(i^(s-i))end

Try it online!

I don't think you need the +0; seems to work without it.

05AB1E, 5 bytes
LD<Rm

Port of @lirtosiast's Jelly answer.
Try it online.
Explanation:
L      # List in the range [1, (implicit) input integer]
       #  i.e. 5 → [1,2,3,4,5]
 D<    # Duplicate this list, and subtract 1 to make the range [0, input)
       #  i.e. [1,2,3,4,5] → [0,1,2,3,4]
   R   # Reverse it to make the range (input, 0]
       #  i.e. [0,1,2,3,4] → [4,3,2,1,0]
    m  # Take the power of the numbers in the lists (at the same indices)
       # (and output implicitly)
       #  i.e. [1,2,3,4,5] and [4,3,2,1,0] → [1,8,9,4,1]

R, 22 bytes
n=scan();(1:n)^(n:1-1)

Fairly self-explanatory; note that the : operator is higher precendence than the - operator so that n:1-1 is shorter than (n-1):0
If we are allowed to start at 0, then we can lose two bytes by using (0:n)^(n:0) avoiding the need for a -1.

Charcoal, 9 bytes
Ｉ⮌ＥＮＸ⁻θιι

Try it online! Link is to verbose version of code. Explanation:
   Ｎ        Input as a number
  Ｅ         Map over implicit range
       ι    Current value
     ⁻      Subtracted from
      θ     First input
    Ｘ       Raised to power
        ι   Current value
 ⮌          Reverse list
Ｉ           Cast to string
             Implicitly print on separate lines

C# (Visual C# Interactive Compiler), 55 bytes
v=>Enumerable.Range(0,v--).Select(i=>Math.Pow(i+1,v--))

Try it online!

C++ (clang), 80 bytes, 71 bytes, 63 bytes, 59 bytes, 56 bytes
int n,c=1;cin>>n;for(;c<=n;++c){cout<<pow(c,n-c)<<endl;}

Try it online!

Perl 5 -n, 21 bytes
say++$\**--$_ while$_

Try it online!

PowerShell, 39 bytes
param($n)1..$n|%{"1"+"*$_"*($n-$_)|iex}

Try it online!
Because exponents are expensive in Powershell, this works by using invoke-expression to parse and calculate the string "1*n*n...*n" Works because the first and last entry are always 1.

Nice. The length of param($n)1..$n|%{[Math]::Pow($_,$n-$_)} is 39 bytes too :)

@mazzy I actually did check that after posting this and chuckled at finding out.

Pari/GP, 22 bytes
n->[i^(n-i)|i<-[1..n]]

Try it online!

Gambit Scheme (gsi), 52 bytes
(lambda(x)(map(lambda(y)(expt y(-x y)))(iota x 1)))

For some reason this code does not appear to work on TIO. It works fine on my machine.
Explanation:
(lambda(x)(map(lambda(y)(expt y(- x y)))(iota x 1)))    Full program
(lambda(x)                                        )    Anonymous function with arg x
          (map(lambda(y)              )(iota x 1))     Map over the range 1 to input
                        (expt y                        Raises the mapped value to...
                               (- x y)                 The input value minus the mapped value (this powers the list by the reverse)

Thunno 2, 5 bytes
RD$_*

Try it online!
Explanation
RD$_*  # Implicit input
R      # Push [1..input]
 D     # Duplicate
  $_   # Subtract from input
    *  # Exponentiate
       # Implicit output

C (gcc) (-lm), 52 bytes
f(n,i){for(i=n;i--;printf("%.0f\n",pow(n-i,i)));}

Try it online!

Can't you just use %.f withouth the 0?
Also, in a trailing comma is allowed, youcan replace \n with ,

APL(NARS), 11 chars, 22 bytes
{⍪⍵*⌽⍵-1}∘⍳

test:
  f←{⍪⍵*⌽⍵-1}∘⍳
  f 5
1
8
9
4
1

SAS, 71 bytes
data a;input n;o=cat(1);do x=1 to n-1;o=catx(',',(n-x)**x,o);end;cards;

Input goes after the cards; statement, separated by newlines, like so:
data a;input n;o=cat(1);do x=1 to n-1;o=catx(',',(n-x)**x,o);end;cards;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Outputs a dataset containing the input n, and comma-separated output string o (and also helper variable x)
+----+------------------------------------------------------------------------------------------+----+
| n  |                                            o                                             | x  |
+----+------------------------------------------------------------------------------------------+----+
¦ 1  ¦ 1                                                                                ¦ 1  ¦
¦ 2  ¦ 1,1                                                                                ¦ 2  ¦
¦ 3  ¦ 1,2,1                                                                                ¦ 3  ¦
¦ 4  ¦ 1,4,3,1                                                                                ¦ 4  ¦
¦ 5  ¦ 1,8,9,4,1                                                                                ¦ 5  ¦
¦ 6  ¦ 1,16,27,16,5,1                                                                           ¦ 6  ¦
¦ 7  ¦ 1,32,81,64,25,6,1                                                                        ¦ 7  ¦
¦ 8  ¦ 1,64,243,256,125,36,7,1                                                                  ¦ 8  ¦
¦ 9  ¦ 1,128,729,1024,625,216,49,8,1                                                            ¦ 9  ¦
¦ 10 ¦ 1,256,2187,4096,3125,1296,343,64,9,1                                                     ¦ 10 ¦
¦ 11 ¦ 1,512,6561,16384,15625,7776,2401,512,81,10,1                                             ¦ 11 ¦
¦ 12 ¦ 1,1024,19683,65536,78125,46656,16807,4096,729,100,11,1                                   ¦ 12 ¦
¦ 13 ¦ 1,2048,59049,262144,390625,279936,117649,32768,6561,1000,121,12,1                        ¦ 13 ¦
¦ 14 ¦ 1,4096,177147,1048576,1953125,1679616,823543,262144,59049,10000,1331,144,13,1            ¦ 14 ¦
¦ 15 ¦ 1,8192,531441,4194304,9765625,10077696,5764801,2097152,531441,100000,14641,1728,169,14,1 ¦ 15 ¦
+----------------------------------------------------------------------------------------------------+

C (clang), 47 bytes
i;f(a){for(i=a;i;printf("%.f,",pow(i,a-i--)));}

Try it online!
Prints in reverse order, delimited with commas.

Arturo, 20 bytes
$->n[map n'i->i^n-i]

Try it!