Pascal's Triangle (Sort of) Most everyone here is familiar with Pascal's Triangle. It's formed by successive rows, where each element is the sum of its two upper-left and upper-right neighbors. Here are the first 5 rows (borrowed from Generate Pascal&#39;s triangle):

    1
   1 1
  1 2 1
 1 3 3 1
1 4 6 4 1
  . . .


Collapse these rows to the left

1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
. . .


Sort them in ascending order

1
1 1
1 1 2
1 1 3 3
1 1 4 4 6
. . .


Read this triangle by rows

[1, 1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 4, 6 ...]


Given an input n, output the nth number in this series. This is OEIS 107430.

Rules


You can choose either 0- or 1-based indexing. Please state which in your submission.
The input and output can be assumed to fit in your language's native integer type.
The input and output can be given by any convenient method.
Either a full program or a function are acceptable. If a function, you can return the output rather than printing it.
Standard loopholes are forbidden.
This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.
JavaScript (ES6), 79 bytes

0-indexed.

f=(n,a=[L=1])=&gt;a[n]||f(n-L,[...a.map((v,i)=&gt;k=(x=v)+~~a[i-1-i%2]),L++&amp;1?k:2*x])


Demo



f=(n,a=[L=1])=&gt;a[n]||f(n-L,[...a.map((v,i)=&gt;k=(x=v)+~~a[i-1-i%2]),L++&amp;1?k:2*x])

console.log([...Array(79).keys()].map(n =&gt; f(n)).join(', '))




How?

f = (                       // f = recursive function taking:
  n,                        //   n = target index
  a = [L = 1]               //   a[] = current row, L = length of current row
) =&gt;                        //
  a[n] ||                   // if a[n] exists, stop recursion and return it
  f(                        // otherwise, do a recursive call to f() with:
    n - L,                  //   n minus the length of the current row
    [                       //   an array consisting of:
      ...a.map((v, i) =&gt;    //     replace each entry v at position i in a[] with:
        k =                 //       a new entry k defined as:
        (x = v) +           //       v +
        ~~a[i - 1 - i % 2]  //       either the last or penultimate entry
      ),                    //     end of map()
      L++ &amp; 1 ?             //     increment L; if L was odd:
        k                   //       append the last updated entry
      :                     //     else:
        2 * x               //       append twice the last original entry
    ]                       //   end of array update
  )                         // end of recursive call


This algorithm directly generates the sorted rows of Pascal's Triangle. It updates n according to the length of the previous row until a[n] exists. For instance, 6 iterations are required for n = 19:

 L | n  | a[]
---+----+------------------------
 1 | 19 | [ 1 ]
 2 | 18 | [ 1, 1 ]
 3 | 16 | [ 1, 1, 2 ]
 4 | 13 | [ 1, 1, 3, 3 ]
 5 |  9 | [ 1, 1, 4, 4, 6 ]
 6 |  4 | [ 1, 1, 5, 5, 10, 10 ]
                        ^^