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.

Showing 1-5 of 5 results.

A342528 Number of compositions with alternating parts weakly decreasing (or weakly increasing).

Original entry on oeis.org

1, 1, 2, 4, 7, 12, 20, 32, 51, 79, 121, 182, 272, 399, 582, 839, 1200, 1700, 2394, 3342, 4640, 6397, 8771, 11955, 16217, 21878, 29386, 39285, 52301, 69334, 91570, 120465, 157929, 206313, 268644, 348674, 451185, 582074, 748830, 960676, 1229208, 1568716, 1997064
Offset: 0

Views

Author

Gus Wiseman, Mar 24 2021

Keywords

Comments

These are finite sequences q of positive integers summing to n such that q(i) >= q(i+2) for all possible i.
The strict case (alternating parts are strictly decreasing) is A000041. Is there a bijective proof?
Yes. Construct a Ferrers diagram by placing odd parts horizontally and even parts vertically in a fishbone pattern. The resulting Ferrers diagram will be for an ordinary partition and the process is reversible. It does not appear that this method can be applied to give a formula for this sequence. - Andrew Howroyd, Mar 25 2021

Examples

			The a(1) = 1 through a(6) = 20 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)
       (11)  (12)   (13)    (14)     (15)
             (21)   (22)    (23)     (24)
             (111)  (31)    (32)     (33)
                    (121)   (41)     (42)
                    (211)   (131)    (51)
                    (1111)  (212)    (141)
                            (221)    (222)
                            (311)    (231)
                            (1211)   (312)
                            (2111)   (321)
                            (11111)  (411)
                                     (1212)
                                     (1311)
                                     (2121)
                                     (2211)
                                     (3111)
                                     (12111)
                                     (21111)
                                     (111111)
		

Crossrefs

The even-length case is A114921.
The version with alternating parts unequal is A224958 (unordered: A000726).
The version with alternating parts equal is A342527.
A000041 counts weakly increasing (or weakly decreasing) compositions.
A000203 adds up divisors.
A002843 counts compositions with all adjacent parts x <= 2y.
A003242 counts anti-run compositions.
A069916/A342492 = decreasing/increasing first quotients.
A070211/A325546 = weakly decreasing/increasing differences.
A175342/A325545 = constant/distinct differences.
A342495 = constant first quotients (unordered: A342496, strict: A342515, ranking: A342522).

Programs

  • Maple
    b:= proc(n, i, j) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1, j)+b(n-i, min(n-i, j), min(n-i, i))))
        end:
    a:= n-> b(n$3):
    seq(a(n), n=0..42);  # Alois P. Heinz, Jan 16 2025
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],GreaterEqual@@Plus@@@Reverse/@Partition[#,2,1]&]],{n,0,15}]
  • PARI
    seq(n)={my(p=1/prod(k=1, n, 1-y*x^k + O(x*x^n))); Vec(1+sum(k=1, n, polcoef(p,k,y)*(polcoef(p,k-1,y) + polcoef(p,k,y))))} \\ Andrew Howroyd, Mar 24 2021

Formula

G.f.: Sum_{k>=0} ([y^k] P(x,y))*([y^k] (1 + y)*P(x,y)), where P(x,y) = Product_{k>=1} 1/(1 - y*x^k). - Andrew Howroyd, Jan 16 2025

Extensions

Terms a(21) and beyond from Andrew Howroyd, Mar 24 2021

A342493 Number of compositions of n with strictly increasing first quotients.

Original entry on oeis.org

1, 1, 2, 3, 6, 8, 11, 16, 22, 28, 39, 49, 61, 77, 93, 114, 140, 169, 198, 233, 276, 321, 381, 439, 509, 591, 678, 774, 883, 1007, 1147, 1300, 1465, 1641, 1845, 2068, 2317, 2590, 2881, 3193, 3549, 3928, 4341, 4793, 5282, 5813, 6401, 7027, 7699, 8432, 9221, 10076
Offset: 0

Views

Author

Gus Wiseman, Mar 16 2021

Keywords

Comments

The first quotients of a sequence are defined as if the sequence were an increasing divisor chain, so for example the first quotients of (6,3,1) are (1/2,1/3).

Examples

			The composition (3,1,1,2) has first quotients (1/3,1,2) so is counted under a(7).
The a(1) = 1 through a(7) = 16 compositions:
  (1)  (2)    (3)    (4)      (5)      (6)        (7)
       (1,1)  (1,2)  (1,3)    (1,4)    (1,5)      (1,6)
              (2,1)  (2,2)    (2,3)    (2,4)      (2,5)
                     (3,1)    (3,2)    (3,3)      (3,4)
                     (1,1,2)  (4,1)    (4,2)      (4,3)
                     (2,1,1)  (1,1,3)  (5,1)      (5,2)
                              (2,1,2)  (1,1,4)    (6,1)
                              (3,1,1)  (2,1,3)    (1,1,5)
                                       (3,1,2)    (2,1,4)
                                       (4,1,1)    (2,2,3)
                                       (2,1,1,2)  (3,1,3)
                                                  (3,2,2)
                                                  (4,1,2)
                                                  (5,1,1)
                                                  (2,1,1,3)
                                                  (3,1,1,2)
		

Crossrefs

The version for differences instead of quotients is A325547.
The weakly increasing version is A342492.
The strictly decreasing version is A342494.
The unordered version is A342498, ranked by A342524.
The strict unordered version is A342517.
A000005 counts constant compositions.
A000009 counts strictly increasing (or strictly decreasing) compositions.
A000041 counts weakly increasing (or weakly decreasing) compositions.
A001055 counts factorizations.
A003238 counts chains of divisors summing to n - 1 (strict: A122651).
A074206 counts ordered factorizations.
A167865 counts strict chains of divisors > 1 summing to n.
A274199 counts compositions with all adjacent parts x < 2y.

Programs

  • Maple
    b:= proc(n, q, l) option remember; `if`(n=0, 1, add(
         `if`(q=0 or q>l/j, b(n-j, l/j, j), 0), j=1..n))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..55);  # Alois P. Heinz, Mar 25 2021
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Less@@Divide@@@Reverse/@Partition[#,2,1]&]],{n,0,15}]
    (* Second program: *)
    b[n_, q_, l_] := b[n, q, l] = If[n == 0, 1, Sum[
         If[q == 0 || q > l/j, b[n - j, l/j, j], 0], {j, 1, n}]];
    a[n_] := b[n, 0, 0];
    a /@ Range[0, 55] (* Jean-François Alcover, May 19 2021, after Alois P. Heinz *)

Extensions

a(21)-a(51) from Alois P. Heinz, Mar 18 2021

A342523 Heinz numbers of integer partitions with weakly increasing first quotients.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 73, 74, 76
Offset: 1

Views

Author

Gus Wiseman, Mar 23 2021

Keywords

Comments

Also called log-concave-up partitions.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
The first quotients of a sequence are defined as if the sequence were an increasing divisor chain, so for example the first quotients of (6,3,1) are (1/2,1/3).

Examples

			The prime indices of 60 are {1,1,2,3}, with first quotients (1,2,3/2), so 60 is not in the sequence.
Most small numbers are in the sequence, but the sequence of non-terms together with their prime indices begins:
   18: {1,2,2}
   30: {1,2,3}
   36: {1,1,2,2}
   50: {1,3,3}
   54: {1,2,2,2}
   60: {1,1,2,3}
   70: {1,3,4}
   72: {1,1,1,2,2}
   75: {2,3,3}
   90: {1,2,2,3}
   98: {1,4,4}
  100: {1,1,3,3}
		

Crossrefs

The version counting strict divisor chains is A057567.
For multiplicities (prime signature) instead of quotients we have A304678.
For differences instead of quotients we have A325360 (count: A240026).
These partitions are counted by A342523 (strict: A342516, ordered: A342492).
The strictly increasing version is A342524.
The weakly decreasing version is A342526.
A000041 counts partitions (strict: A000009).
A000929 counts partitions with adjacent parts x >= 2y.
A001055 counts factorizations (strict: A045778, ordered: A074206).
A003238 counts chains of divisors summing to n - 1 (strict: A122651).
A167865 counts strict chains of divisors > 1 summing to n.
A318991/A318992 rank reversed partitions with/without integer quotients.
A342086 counts strict chains of divisors with strictly increasing quotients.

Programs

  • Mathematica
    primeptn[n_]:=If[n==1,{},Reverse[Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]];
    Select[Range[100],LessEqual@@Divide@@@Reverse/@Partition[primeptn[#],2,1]&]

A342516 Number of strict integer partitions of n with weakly increasing first quotients.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 5, 5, 6, 7, 8, 8, 11, 12, 14, 15, 17, 17, 21, 22, 26, 29, 31, 32, 35, 38, 42, 45, 48, 51, 58, 59, 63, 70, 76, 80, 88, 94, 98, 105, 113, 121, 129, 133, 143, 153, 159, 166, 183, 189, 195, 210, 221, 231, 248, 262, 273, 284, 298, 312
Offset: 0

Views

Author

Gus Wiseman, Mar 20 2021

Keywords

Comments

Also called log-concave-up strict partitions.
Also the number of reversed strict integer partitions of n with weakly increasing first quotients.
The first quotients of a sequence are defined as if the sequence were an increasing divisor chain, so for example the first quotients of (6,3,1) are (1/2,1/3).

Examples

			The partition (6,3,2,1) has first quotients (1/2,2/3,1/2) so is not counted under a(12), even though the first differences (-3,-1,-1) are weakly increasing.
The a(1) = 1 through a(13) = 11 partitions (A..D = 10..13):
  1   2   3    4    5    6    7     8     9     A     B     C     D
          21   31   32   42   43    53    54    64    65    75    76
                    41   51   52    62    63    73    74    84    85
                              61    71    72    82    83    93    94
                              421   521   81    91    92    A2    A3
                                          621   532   A1    B1    B2
                                                721   632   732   C1
                                                      821   921   643
                                                                  832
                                                                  931
                                                                  A21
		

Crossrefs

The version for differences instead of quotients is A179255.
The non-strict ordered version is A342492.
The non-strict version is A342497 (ranking: A342523).
The strictly increasing version is A342517.
The weakly decreasing version is A342519.
A000041 counts partitions (strict: A000009).
A000929 counts partitions with all adjacent parts x >= 2y.
A001055 counts factorizations (strict: A045778, ordered: A074206).
A003238 counts chains of divisors summing to n - 1 (strict: A122651).
A167865 counts strict chains of divisors > 1 summing to n.
A342094 counts partitions with all adjacent parts x <= 2y (strict: A342095).

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&LessEqual@@Divide@@@Reverse/@Partition[#,2,1]&]],{n,0,30}]

A342497 Number of integer partitions of n with weakly increasing first quotients.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 9, 11, 15, 18, 23, 25, 32, 36, 43, 49, 60, 65, 75, 83, 96, 106, 121, 131, 150, 163, 178, 194, 217, 230, 254, 275, 300, 320, 350, 374, 411, 439, 470, 503, 548, 578, 625, 666, 710, 758, 815, 855, 913, 970, 1029, 1085, 1157, 1212, 1288, 1360
Offset: 0

Views

Author

Gus Wiseman, Mar 17 2021

Keywords

Comments

Also called log-concave-up partitions.
Also the number of reversed integer partitions of n with weakly increasing first quotients.
The first quotients of a sequence are defined as if the sequence were an increasing divisor chain, so for example the first quotients of (6,3,1) are (1/2,1/3).

Examples

			The partition y = (6,3,2,1,1) has first quotients (1/2,2/3,1/2,1) so is not counted under a(13). However, the first differences (-3,-1,-1,0) are weakly increasing, so y is counted under A240026(13).
The a(1) = 1 through a(8) = 15 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (31)    (41)     (42)      (52)       (53)
                    (211)   (311)    (51)      (61)       (62)
                    (1111)  (2111)   (222)     (322)      (71)
                            (11111)  (411)     (421)      (422)
                                     (3111)    (511)      (521)
                                     (21111)   (4111)     (611)
                                     (111111)  (31111)    (2222)
                                               (211111)   (4211)
                                               (1111111)  (5111)
                                                          (41111)
                                                          (311111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

The version for differences instead of quotients is A240026.
The ordered version is A342492.
The strictly increasing version is A342498.
The weakly decreasing version is A342513.
The strict case is A342516.
The Heinz numbers of these partitions are A342523.
A000005 counts constant partitions.
A000009 counts strict partitions.
A000041 counts partitions.
A000929 counts partitions with all adjacent parts x >= 2y.
A001055 counts factorizations.
A003238 counts chains of divisors summing to n - 1 (strict: A122651).
A074206 counts ordered factorizations.
A167865 counts strict chains of divisors > 1 summing to n.
A342094 counts partitions with all adjacent parts x <= 2y.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],LessEqual@@Divide@@@Reverse/@Partition[#,2,1]&]],{n,0,30}]
Showing 1-5 of 5 results.