A238639 Position of [n, n-1, ..., 2, 1] in Mathematica-ordered list of partitions of n(n+1)/2.
1, 1, 2, 6, 23, 103, 498, 2493, 12741, 66224, 348963, 1859009, 9994196, 54155387, 295477841, 1621962199, 8951635343, 49644856801, 276540258555, 1546630084062, 8681889729354, 48900895532763, 276302483274825, 1565747892473958, 8896975706929141, 50683901455201860
Offset: 0
Keywords
Examples
The partitions of 6 in Mathematica order are 6, 51, 42, 411, 33, 321, 3111, 222, 2211, 21111, 111111. The position of 321 is a(3) = 6.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..200
- Manfred Scheucher, C Code
Programs
-
Maple
g:= (n, i)-> `if`(n=0, 1, g(n-i+1, i-1)+ b(n-i, i)): b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, b(n, i-1)+`if`(i>n, 0, b(n-i, i)))) end: a:= n-> (m-> add(b(m-j, min(j, m-j)), j=n+1..m)+ g(m-n, n))(n*(n+1)/2): seq(a(n), n=0..25); # Alois P. Heinz, Jun 03 2015
-
Mathematica
r[n_] := Table[n - k, {k, 0, n - 1}]; Flatten[Table[Position[IntegerPartitions[n (n + 1)/2], r[n]], {n, 0, 2}]] g[n_, i_] := If[n==0, 1, g[n-i+1, i-1] + b[n-i, i]]; 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]]]]; a[n_] := Function[m, Sum[b[m-j, Min[j, m-j]], {j, n+1, m}] + g[m-n, n]][n(n+1)/2]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Oct 28 2015, after Alois P. Heinz *)
Extensions
a(13)-a(17) from Manfred Scheucher, Jun 01 2015
a(18)-a(25) from Alois P. Heinz, Jun 02 2015