OFFSET
0,5
COMMENTS
For n>=1 number of up-steps in all partitions of n (represented as weakly increasing lists), see example. - Joerg Arndt, Sep 03 2014
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
M. Archibald, A. Blecher, A. Knopfmacher, and M. E. Mays, Inversions and Parity in Compositions of Integers, J. Int. Seq., Vol. 23 (2020), Article 20.4.1.
Anders Claesson, Atli Fannar Franklín, and Einar Steingrímsson, Permutations with few inversions, arXiv:2305.09457 [math.CO], 2023.
S. Heubach, A. Knopfmacher, M. E. Mays and A. Munagi, Inversions in Compositions of Integers, Quaestiones Mathematicae 34 (2011), 187-202.
FORMULA
From Andrew Howroyd, Apr 21 2023: (Start)
G.f.: (2*x - 1)*P(x)/(1 - x) where P(x) is the g.f. of A000041. (End)
EXAMPLE
a(6) = 8 because the 11 partitions of 6
01: [ 1 1 1 1 1 1 ]
02: [ 1 1 1 1 2 ]
03: [ 1 1 1 3 ]
04: [ 1 1 2 2 ]
05: [ 1 1 4 ]
06: [ 1 2 3 ]
07: [ 1 5 ]
08: [ 2 2 2 ]
09: [ 2 4 ]
10: [ 3 3 ]
11: [ 6 ]
contain 0+1+1+1+1+2+1+0+1+0+0 = 8 up-steps. - Joerg Arndt, Sep 03 2014
MAPLE
a:= proc(n) uses combinat; add(numbpart(k), k=0..n-1)-numbpart(n) end:
seq(a(n), n=0..49);
MATHEMATICA
p[n_] := IntegerPartitions[n]; l[n_] := Length[p[n]]; Table[Count[Flatten[p[n]], 1] - l[n], {n, 0, 30}] (* Clark Kimberling, Mar 08 2012 *)
PROG
(PARI) a(n) = {sum(k=0, n-1, numbpart(k)) - numbpart(n)} \\ Andrew Howroyd, Apr 21 2023
(PARI) Vec((2*x - 1)/(1 - x)/eta(x + O(x^51))) \\ Andrew Howroyd, Apr 21 2023
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Edward Early, Jan 08 2001
EXTENSIONS
More terms from James A. Sellers, Sep 28 2001
STATUS
approved