OFFSET
0,7
COMMENTS
From Gus Wiseman, Jun 17 2023: (Start)
Also the number of integer compositions of n with weighted sum 3*n, where the weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i * y_i. The a(0) = 1 through a(9) = 14 compositions are:
() . . . . (11111) (3111) (3211) (3311) (3411)
(11211) (11311) (4121) (4221)
(12121) (11411) (5112)
(21112) (12221) (11511)
(13112) (12321)
(21131) (13131)
(21212) (13212)
(111122) (21231)
(21312)
(22122)
(31113)
(111141)
(111222)
(112113)
For partitions we have A363527, ranks A363531. For reversed partitions we have A363526, ranks A363530.
(End)
EXAMPLE
a(5) = #{4+3+2+1} = 1;
a(6) = #{5+4+3, 5+4+2+1} = 2;
a(7) = #{6+5+3, 6+5+2+1, 6+4+3+1, 5+4+3+2} = 4;
a(8) = #{7+6+3, 7+6+2+1, 7+6+3, 7+5+3+1, 7+4+3+2, 6+5+4+1, 6+5+3+2, 6+4+3+2+1} = 8;
a(9) = #{8+7+3, 8+7+2+1, 8+6+4, 8+6+3+1, 8+5+4+1, 8+5+3+2, 8+4+3+2+1, 7+6+5, 7+6+4+1, 7+6+3+2, 7+5+4+2, 7+5+3+2+1, 6+5+4+3, 6+5+4+2+1} = 14.
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], Total[Accumulate[#]]==3n&]], {n, 0, 15}] (* Gus Wiseman, Jun 17 2023 *)
PROG
(Haskell)
a231429 n = p [1..n-1] (2*n) where
p _ 0 = 1
p [] _ = 0
p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
CROSSREFS
A053632 counts compositions by weighted sum.
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 14 2013
STATUS
approved