[go: up one dir, main page]

login
A325676
Number of compositions of n such that every distinct consecutive subsequence has a different sum.
57
1, 1, 2, 4, 5, 10, 12, 24, 26, 47, 50, 96, 104, 172, 188, 322, 335, 552, 590, 938, 1002, 1612, 1648, 2586, 2862, 4131, 4418, 6718, 7122, 10332, 11166, 15930, 17446, 24834, 26166, 37146, 41087, 55732, 59592, 84068, 89740, 122106, 133070, 177876, 194024, 262840, 278626
OFFSET
0,3
COMMENTS
A composition of n is a finite sequence of positive integers summing to n.
Compare to the definition of knapsack partitions (A108917).
LINKS
Fausto A. C. Cariboni, Table of n, a(n) for n = 0..100
EXAMPLE
The distinct consecutive subsequences of (1,4,4,3) together with their sums are:
1: {1}
3: {3}
4: {4}
5: {1,4}
7: {4,3}
8: {4,4}
9: {1,4,4}
11: {4,4,3}
12: {1,4,4,3}
Because the sums are all different, (1,4,4,3) is counted under a(12).
The a(1) = 1 through a(6) = 12 compositions:
(1) (2) (3) (4) (5) (6)
(11) (12) (13) (14) (15)
(21) (22) (23) (24)
(111) (31) (32) (33)
(1111) (41) (42)
(113) (51)
(122) (114)
(221) (132)
(311) (222)
(11111) (231)
(411)
(111111)
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], UnsameQ@@Total/@Union[ReplaceList[#, {___, s__, ___}:>{s}]]&]], {n, 0, 15}]
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 13 2019
EXTENSIONS
a(21)-a(22) from Jinyuan Wang, Jun 20 2020
a(23)-a(25) from Robert Price, Jun 19 2021
a(26)-a(46) from Fausto A. C. Cariboni, Feb 10 2022
STATUS
approved