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.

Previous Showing 11-19 of 19 results.

A309938 Triangle read by rows: T(n,k) is the number of compositions of n with k parts and differences all equal to 1 or -1.

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 1, 0, 1, 0, 1, 2, 1, 0, 0, 1, 0, 2, 2, 0, 0, 1, 2, 1, 0, 1, 0, 0, 1, 0, 1, 4, 1, 0, 0, 0, 1, 2, 2, 0, 3, 2, 0, 0, 0, 1, 0, 1, 4, 2, 0, 1, 0, 0, 0, 1, 2, 1, 0, 3, 6, 1, 0, 0, 0, 0, 1, 0, 2, 4, 3, 0, 4, 2, 0, 0, 0, 0, 1, 2, 1, 0, 3, 8, 3, 0, 1, 0, 0, 0, 0
Offset: 1

Views

Author

Andrew Howroyd, Aug 23 2019

Keywords

Comments

Parts will alternate between being odd and even. For even k, a composition cannot be the same as its reversal and therefore for even k, T(n,k) is even.

Examples

			Triangle begins:
  1;
  1, 0;
  1, 2, 0;
  1, 0, 1, 0;
  1, 2, 1, 0, 0;
  1, 0, 2, 2, 0,  0;
  1, 2, 1, 0, 1,  0, 0;
  1, 0, 1, 4, 1,  0, 0, 0;
  1, 2, 2, 0, 3,  2, 0, 0, 0;
  1, 0, 1, 4, 2,  0, 1, 0, 0, 0;
  1, 2, 1, 0, 3,  6, 1, 0, 0, 0, 0;
  1, 0, 2, 4, 3,  0, 4, 2, 0, 0, 0, 0;
  1, 2, 1, 0, 3,  8, 3, 0, 1, 0, 0, 0, 0;
  1, 0, 1, 4, 3,  0, 6, 8, 1, 0, 0, 0, 0, 0;
  1, 2, 2, 0, 4, 10, 5, 0, 5, 2, 0, 0, 0, 0, 0;
  ...
For n = 6 there are a total of 5 compositions:
  k = 1: (6)
  k = 3: (123), (321)
  k = 4: (2121), (1212)
		

Crossrefs

Row sums are A173258.
T(2n,n) gives A364529.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n<1 or i<1, 0,
         `if`(n=i, x, add(expand(x*b(n-i, i+j)), j=[-1, 1])))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(add(b(n, j), j=1..n)):
    seq(T(n), n=1..14);  # Alois P. Heinz, Jul 22 2023
  • Mathematica
    b[n_, i_] := b[n, i] = If[n < 1 || i < 1, 0, If[n == i, x, Sum[Expand[x*b[n - i, i + j]], {j, {-1, 1}}]]];
    T[n_] :=  CoefficientList[Sum[b[n, j], {j, 1, n}], x] // Rest // PadRight[#, n]&;
    Table[T[n], {n, 1, 13}] // Flatten (* Jean-François Alcover, Sep 06 2023, after Alois P. Heinz *)
  • PARI
    step(R,n)={matrix(n, n, i, j, if(i>j, if(j>1, R[i-j, j-1]) + if(j+1<=n, R[i-j, j+1])) )}
    T(n)={my(v=vector(n), R=matid(n), m=0); while(R, m++; v[m]+=vecsum(R[n,]); R=step(R,n)); v}
    for(n=1, 15, print(T(n)))

A342496 Number of integer partitions of n with constant (equal) first quotients.

Original entry on oeis.org

1, 1, 2, 3, 4, 4, 6, 6, 7, 7, 8, 7, 11, 9, 11, 12, 12, 10, 14, 12, 15, 16, 14, 13, 19, 15, 17, 17, 20, 16, 23, 19, 21, 20, 20, 22, 26, 21, 23, 25, 28, 22, 30, 24, 27, 29, 26, 25, 33, 29, 30, 29, 32, 28, 34, 31, 36, 34, 32, 31, 42
Offset: 0

Views

Author

Gus Wiseman, Mar 17 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 partition (12,6,3) has first quotients (1/2,1/2) so is counted under a(21).
The a(1) = 1 through a(9) = 7 partitions:
  1   2    3     4      5       6        7         8          9
      11   21    22     32      33       43        44         54
           111   31     41      42       52        53         63
                 1111   11111   51       61        62         72
                                222      421       71         81
                                111111   1111111   2222       333
                                                   11111111   111111111
		

Crossrefs

The version for differences instead of quotients is A049988.
The ordered version is A342495.
The distinct version is A342514.
The strict case is A342515.
The Heinz numbers of these partitions are A342522.
A000005 counts constant partitions.
A003238 counts chains of divisors summing to n - 1 (strict: A122651).
A167865 counts strict chains of divisors > 1 summing to n.

Programs

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

Formula

a(n > 0) = (A342495(n) + A000005(n))/2.

A342514 Number of integer partitions of n with distinct first quotients.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 6, 8, 11, 14, 18, 24, 28, 35, 41, 52, 64, 81, 93, 115, 137, 157, 190, 225, 268, 313, 366, 430, 502, 587, 683, 790, 913, 1055, 1217, 1393, 1605, 1830, 2098, 2384, 2722, 3101, 3524, 4005, 4524, 5137, 5812, 6570, 7434, 8360, 9416, 10602, 11881
Offset: 0

Views

Author

Gus Wiseman, Mar 17 2021

Keywords

Comments

Also the number of reversed integer partitions of n with distinct 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 (4,3,3,2,1) has first quotients (3/4,1,2/3,1/2) so is counted under a(13), but it has first differences (-1,0,-1,-1) so is not counted under A325325(13).
The a(1) = 1 through a(9) = 14 partitions:
  (1)  (2)   (3)   (4)    (5)    (6)    (7)     (8)     (9)
       (11)  (21)  (22)   (32)   (33)   (43)    (44)    (54)
                   (31)   (41)   (42)   (52)    (53)    (63)
                   (211)  (221)  (51)   (61)    (62)    (72)
                          (311)  (321)  (322)   (71)    (81)
                                 (411)  (331)   (332)   (432)
                                        (511)   (422)   (441)
                                        (3211)  (431)   (522)
                                                (521)   (531)
                                                (611)   (621)
                                                (3221)  (711)
                                                        (3321)
                                                        (4311)
                                                        (5211)
		

Crossrefs

The version for differences instead of quotients is A325325.
The ordered version is A342529.
The strict case is A342520.
The Heinz numbers of these partitions are A342521.
A000005 counts constant partitions.
A000009 counts strict partitions.
A000041 counts partitions.
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.
A342096 counts partitions with all adjacent parts x < 2y (strict: A342097).
A342098 counts partitions with all adjacent parts x > 2y.

Programs

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

A325552 Number of compositions of n with distinct differences up to sign.

Original entry on oeis.org

1, 1, 2, 3, 6, 9, 12, 23, 38, 61, 78, 135, 194, 315, 454, 699, 982, 1495, 2102, 3085, 4406, 6583, 9048, 13117, 18540, 26399, 36484, 51885, 72498, 100031, 139342, 192621, 267068, 367631, 505954, 687153, 946412, 1283367, 1745974, 2356935, 3207554, 4311591, 5816404
Offset: 0

Views

Author

Gus Wiseman, May 11 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
The differences of a sequence are defined as if the sequence were increasing, so for example the differences of (3,1,2) are (-2,1).
a(n) has the same parity as n for n > 0, since reversing a composition does not change whether or not it has this property, and the only valid symmetric compositions are (n) and (n/2,n/2), with the latter only existing for even n. - Charlie Neder, Jun 06 2019

Examples

			The differences of (1,2,1) are (1,-1), which are different but not up to sign, so (1,2,1) is not counted under a(4).
The a(1) = 1 through a(7) = 23 compositions:
  (1)  (2)   (3)   (4)    (5)    (6)    (7)
       (11)  (12)  (13)   (14)   (15)   (16)
             (21)  (22)   (23)   (24)   (25)
                   (31)   (32)   (33)   (34)
                   (112)  (41)   (42)   (43)
                   (211)  (113)  (51)   (52)
                          (122)  (114)  (61)
                          (221)  (132)  (115)
                          (311)  (213)  (124)
                                 (231)  (133)
                                 (312)  (142)
                                 (411)  (214)
                                        (223)
                                        (241)
                                        (322)
                                        (331)
                                        (412)
                                        (421)
                                        (511)
                                        (1132)
                                        (2113)
                                        (2311)
                                        (3112)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@Abs[Differences[#]]&]],{n,0,15}]

Extensions

a(26)-a(42) from Alois P. Heinz, Jan 27 2024

A342498 Number of integer partitions of n with strictly increasing first quotients.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 5, 6, 8, 9, 12, 12, 14, 16, 18, 20, 24, 26, 27, 30, 35, 37, 45, 47, 52, 56, 61, 65, 72, 77, 83, 90, 95, 99, 109, 117, 127, 135, 144, 151, 164, 172, 181, 197, 209, 222, 239, 249, 263, 280, 297, 310, 332, 349, 368, 391, 412, 433, 457, 480, 503
Offset: 0

Views

Author

Gus Wiseman, Mar 17 2021

Keywords

Comments

Also the number of reversed integer partitions of n with strictly 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 = (13,7,2,1) has first quotients (7/13,2/7,1/2) so is not counted under a(23). However, the first differences (-6,-5,-1) are strictly increasing, so y is counted under A240027(23).
The a(1) = 1 through a(9) = 9 partitions:
  (1)  (2)   (3)   (4)    (5)    (6)    (7)    (8)    (9)
       (11)  (21)  (22)   (32)   (33)   (43)   (44)   (54)
                   (31)   (41)   (42)   (52)   (53)   (63)
                   (211)  (311)  (51)   (61)   (62)   (72)
                                 (411)  (322)  (71)   (81)
                                        (511)  (422)  (522)
                                               (521)  (621)
                                               (611)  (711)
                                                      (5211)
		

Crossrefs

The version for differences instead of quotients is A240027.
The ordered version is A342493.
The weakly increasing version is A342497.
The strictly decreasing version is A342499.
The strict case is A342517.
The Heinz numbers of these partitions are A342524.
A000005 counts constant partitions.
A000009 counts strict partitions.
A000041 counts partitions.
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.
A342096 counts partitions with adjacent x < 2y (strict: A342097).
A342098 counts partitions with adjacent parts x > 2y.

Programs

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

A342499 Number of integer partitions of n with strictly decreasing first quotients.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 5, 5, 7, 9, 10, 11, 14, 15, 18, 20, 23, 26, 31, 34, 39, 42, 45, 51, 58, 65, 70, 78, 83, 91, 102, 111, 122, 133, 145, 158, 170, 182, 202, 217, 231, 248, 268, 285, 307, 332, 354, 374, 404, 436, 468, 502, 537, 576, 618, 654, 694, 737, 782, 830
Offset: 0

Views

Author

Gus Wiseman, Mar 17 2021

Keywords

Comments

Also the number of reversed partitions of n with strictly decreasing 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,6,3,1) has first quotients (1,1/2,1/3) so is counted under a(16).
The a(1) = 1 through a(9) = 9 partitions:
  (1)  (2)   (3)   (4)   (5)    (6)    (7)    (8)    (9)
       (11)  (21)  (22)  (32)   (33)   (43)   (44)   (54)
                   (31)  (41)   (42)   (52)   (53)   (63)
                         (221)  (51)   (61)   (62)   (72)
                                (321)  (331)  (71)   (81)
                                              (332)  (432)
                                              (431)  (441)
                                                     (531)
                                                     (3321)
		

Crossrefs

The version for differences instead of quotients is A320470.
The ordered version is A342494.
The strictly increasing version is A342498.
The weakly decreasing version is A342513.
The strict case is A342518.
The Heinz numbers of these partitions are listed by A342525.
A000005 counts constant partitions.
A000009 counts strict partitions.
A000041 counts partitions.
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.
A342096 counts partitions with adjacent x < 2y (strict: A342097).
A342098 counts partitions with adjacent parts x > 2y.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Greater@@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}]

A342513 Number of integer partitions of n with weakly decreasing first quotients.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 7, 8, 9, 12, 13, 15, 20, 21, 24, 28, 29, 33, 40, 44, 49, 57, 61, 65, 77, 84, 87, 99, 106, 115, 132, 141, 152, 167, 180, 193, 212, 228, 246, 274, 290, 309, 338, 357, 382, 412, 439, 463, 498, 536, 569, 608, 648, 693, 743, 790, 839, 903, 949
Offset: 1

Views

Author

Gus Wiseman, Mar 17 2021

Keywords

Comments

Also called log-concave-down partitions.
Also the number of reversed integer partitions of n with weakly decreasing 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 (9,7,4,2,1) has first quotients (7/9,4/7,1/2,1/2) so is counted under a(23).
The a(1) = 1 through a(8) = 9 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (31)    (41)     (42)      (52)       (53)
                    (1111)  (221)    (51)      (61)       (62)
                            (11111)  (222)     (331)      (71)
                                     (321)     (421)      (332)
                                     (111111)  (2221)     (431)
                                               (1111111)  (2222)
                                                          (11111111)
		

Crossrefs

The ordered version is A069916.
The version for differences instead of quotients is A320466.
The weakly increasing version is A342497.
The strictly decreasing version is A342499.
The strict case is A342519.
The Heinz numbers of these partitions are A342526.
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 adjacent parts x <= 2y.

Programs

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

A342194 Number of strict compositions of n with equal differences, or strict arithmetic progressions summing to n.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 7, 7, 7, 13, 11, 11, 17, 13, 15, 25, 17, 17, 29, 19, 23, 35, 25, 23, 39, 29, 29, 45, 33, 29, 55, 31, 35, 55, 39, 43, 65, 37, 43, 65, 51, 41, 77, 43, 51, 85, 53, 47, 85, 53, 65, 87, 61, 53, 99, 67, 67, 97, 67, 59, 119, 61, 71, 113, 75, 79, 123, 67, 79, 117
Offset: 0

Views

Author

Gus Wiseman, Apr 02 2021

Keywords

Examples

			The a(1) = 1 through a(9) = 13 compositions:
  (1)  (2)  (3)    (4)    (5)    (6)      (7)    (8)    (9)
            (1,2)  (1,3)  (1,4)  (1,5)    (1,6)  (1,7)  (1,8)
            (2,1)  (3,1)  (2,3)  (2,4)    (2,5)  (2,6)  (2,7)
                          (3,2)  (4,2)    (3,4)  (3,5)  (3,6)
                          (4,1)  (5,1)    (4,3)  (5,3)  (4,5)
                                 (1,2,3)  (5,2)  (6,2)  (5,4)
                                 (3,2,1)  (6,1)  (7,1)  (6,3)
                                                        (7,2)
                                                        (8,1)
                                                        (1,3,5)
                                                        (2,3,4)
                                                        (4,3,2)
                                                        (5,3,1)
		

Crossrefs

Strict compositions in general are counted by A032020.
The unordered version is A049980.
The non-strict version is A175342.
A000203 adds up divisors.
A000726 counts partitions with alternating parts unequal.
A003242 counts anti-run compositions.
A224958 counts compositions with alternating parts unequal.
A342343 counts compositions with alternating parts strictly decreasing.
A342495 counts compositions with constant quotients.
A342527 counts compositions with alternating parts equal.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@Select[IntegerPartitions[n],UnsameQ@@#&],SameQ@@Differences[#]&]],{n,0,30}]

Formula

a(n > 0) = A175342(n) - A000005(n) + 1.
a(n > 0) = 2*A049988(n) - 2*A000005(n) + 1 = 2*A049982(n) + 1.
Previous Showing 11-19 of 19 results.