login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A238639 Position of [n, n-1, ..., 2, 1] in Mathematica-ordered list of partitions of n(n+1)/2. 6
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
Manfred Scheucher, C Code
EXAMPLE
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.
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 *)
CROSSREFS
Cf. A000217, A080577 (Mathematica ordering), A238638, A238640, A330661, A332706.
Sequence in context: A356111 A279573 A174193 * A226995 A301897 A022558
KEYWORD
nonn
AUTHOR
Clark Kimberling, Mar 04 2014
EXTENSIONS
a(13)-a(17) from Manfred Scheucher, Jun 01 2015
a(18)-a(25) from Alois P. Heinz, Jun 02 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 08:33 EDT 2024. Contains 371905 sequences. (Running on oeis4.)