cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A353865 Number of complete rucksack partitions of n. Partitions whose weak run-sums are distinct and cover an initial interval of nonnegative integers.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 5, 2, 3, 4, 3, 2, 4, 3, 3, 4, 4, 3, 4, 3, 4, 5, 5, 4, 6, 4, 6, 5, 4, 5, 6, 5, 6, 7, 6, 5, 9, 6, 6, 7, 6, 8, 9, 6, 6, 8, 9, 7, 9, 9, 7, 10, 9, 8, 13, 7, 10, 11, 8, 9, 10, 11, 12, 9, 11, 9, 15, 12, 12, 19, 13, 16, 16
Offset: 0

Views

Author

Gus Wiseman, Jun 04 2022

Keywords

Comments

Every sequence can be uniquely split into a sequence of non-overlapping runs. For example, the runs of (2,2,1,1,1,3,2,2) are ((2,2),(1,1,1),(3),(2,2)), with sums (4,3,3,4). A weak run-sum is the sum of any consecutive constant subsequence.
Do all positive integers appear only finitely many times in this sequence?

Examples

			The a(n) compositions for n = 1, 3, 9, 15, 18:
  (1)  (21)   (4311)       (54321)            (543321)
       (111)  (51111)      (532221)           (654111)
              (111111111)  (651111)           (7611111)
                           (81111111)         (111111111111111111)
                           (111111111111111)
For example, the weak runs of y = {7,5,4,4,3,3,3,1,1} are {}, {1}, {1,1}, {3}, {4}, {5}, {3,3}, {7}, {4,4}, {3,3,3}, with sums 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, which are all distinct and cover an initial interval, so y is counted under a(31).
		

Crossrefs

Perfect partitions are counted by A002033, ranked by A325780.
Knapsack partitions are counted by A108917, ranked by A299702.
This is the complete case of A353864, ranked by A353866.
These partitions are ranked by A353867.
A000041 counts partitions, strict A000009.
A275870 counts collapsible partitions, ranked by A300273.
A304442 counts partitions with all equal run-sums, ranked by A353833.
A353832 represents the operation of taking run-sums of a partition.
A353836 counts partitions by number of distinct run-sums.
A353837 counts partitions with distinct run-sums, ranked by A353838.
A353840-A353846 pertain to partition run-sum trajectory.
A353850 counts compositions with all distinct run-sums, ranked by A353852.
A353863 counts partitions whose weak run-sums cover an initial interval.

Programs

  • Mathematica
    norqQ[m_]:=Sort[m]==Range[0,Max[m]];
    msubs[s_]:=Join@@@Tuples[Table[Take[t,i],{t,Split[s]},{i,0,Length[t]}]];
    Table[Length[Select[IntegerPartitions[n],norqQ[Total/@Select[msubs[#],SameQ@@#&]]&]],{n,0,15}]
  • PARI
    a(n) = my(c=0, s, v); if(n, forpart(p=n, if(p[1]==1, v=List([s=1]); for(i=2, #p, if(p[i]==p[i-1], listput(v, s+=p[i]), listput(v, s=p[i]))); s=#v; listsort(v, 1); if(s==#v&&s==v[s], c++))); c, 1); \\ Jinyuan Wang, Feb 21 2025

Extensions

More terms from Jinyuan Wang, Feb 21 2025