%I #28 Aug 30 2016 10:12:48
%S 1,2,4,14,109,3366,380480,592178710,12245355432908,
%T 42590813279958575804,35428820136077436448479258280,
%U 643572551892460566707053818908283349242945,1088540944742787295982636155758383327725184898133092177544054
%N Position of n-th row of Pascal's triangle in Mathematica-ordered list of partitions of 2^n.
%H Alois P. Heinz, <a href="/A238638/b238638.txt">Table of n, a(n) for n = 0..14</a>
%H Manfred Scheucher, <a href="/A238638/a238638_1.c.txt">C-Code</a>
%e The partitions of 4 in Mathematica order are 4, 31, 22, 211, 111. a(2) = 4 is the position of 211, which as a partition is equivalent to row 2 of Pascal's triangle: 1 2 1 (where the top row is counted as row 0).
%p p:= (n, k)-> binomial(n, iquo(2*n-k+1, 2)):
%p g:= (n, k, i)-> `if`(n=0, 1, g(n-p(k, i-1), k, i-1)
%p +add(b(n-j, j), j=p(k, i-1)+1..min(n, p(k, i)))):
%p b:= proc(n, i) option remember; `if`(n=0, 1,
%p `if`(i<1, 0, b(n, i-1)+`if`(i>n, 0, b(n-i, i))))
%p end:
%p a:= n-> (m-> add(b(m-j, min(j, m-j)), j=p(n$2)+1..m)
%p +g(m-p(n$2), n$2))(2^n):
%p seq(a(n), n=0..10); # _Alois P. Heinz_, Jun 03 2015
%t r[n_] := Reverse[Sort[Table[Binomial[n, k], {k, 0, n}]]]; Flatten[Table[Position[IntegerPartitions[2^n], r[n]], {n, 0, 6}]]
%t (* second program: *)
%t $RecursionLimit = 2000;
%t p[n_, k_] := Binomial[n, Quotient[2*n - k + 1, 2]];
%t g[n_, k_, i_] := If[n == 0, 1, g[n - p[k, i - 1], k, i - 1] + Sum[b[n - j, j], {j, p[k, i - 1] + 1, Min[n, p[k, i]]}]];
%t b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, b[n, i - 1] + If[i > n, 0, b[n - i, i]]]];
%t a[n_] := Function[m, Sum[b[m - j, Min[j, m - j]], {j, p[n, n] + 1, m}] + g[m - p[n, n], n, n]][2^n];
%t Table[a[n], {n, 0, 10}] (* _Jean-François Alcover_, Aug 30 2016, after _Alois P. Heinz_ *)
%Y Cf. A007318, A080577 (Mathematica ordering), A238639, A238640.
%K nonn
%O 0,2
%A _Clark Kimberling_, Mar 04 2014
%E a(7) from _Manfred Scheucher_, May 29 2015
%E a(8)-a(12) from _Alois P. Heinz_, Jun 03 2015