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-10 of 13 results. Next

A235998 Triangle read by rows: T(n,k) is the number of compositions of n having k distinct parts (n>=1, 1<=k<=floor((sqrt(1+8*n)-1)/2)).

Original entry on oeis.org

1, 2, 2, 2, 3, 5, 2, 14, 4, 22, 6, 2, 44, 18, 4, 68, 56, 3, 107, 146, 4, 172, 312, 24, 2, 261, 677, 84, 6, 396, 1358, 288, 2, 606, 2666, 822, 4, 950, 5012, 2226, 4, 1414, 9542, 5304, 120, 5, 2238, 17531, 12514, 480, 2, 3418, 32412, 27904, 1800, 6, 5411, 58995, 61080, 5580
Offset: 1

Views

Author

Omar E. Pol, Jan 19 2014

Keywords

Comments

Row n has length A003056(n) hence the first element of column k is in row A000217(k).
The equivalent sequence for partitions is A116608.
For the number of compositions of n see A011782.
For the connection to overcompositions see A235999.
Row sums give A011782(n), n >= 1.
First column is A000005, second column is A131661.
T(k*(k+1)/2,k) = T(A000217(k),k) = A000142(k) = k!. - Alois P. Heinz, Jan 20 2014

Examples

			Triangle begins:
  1;
  2;
  2,    2;
  3,    5;
  2,   14;
  4,   22,     6;
  2,   44,    18;
  4,   68,    56;
  3,  107,   146;
  4,  172,   312,    24;
  2,  261,   677,    84;
  6,  396,  1358,   288;
  2,  606,  2666,   822;
  4,  950,  5012,  2226;
  4, 1414,  9542,  5304,  120;
  5, 2238, 17531, 12514,  480;
  2, 3418, 32412, 27904, 1800;
  6, 5411, 58995, 61080, 5580;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
          expand(add(b(n-i*j, i-1, p+j)/j!*`if`(j=0, 1, x), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n$2, 0)):
    seq(T(n), n=1..25); # Alois P. Heinz, Jan 20 2014, revised May 25 2014
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n==0, p!, If[i<1, 0, Sum[b[n-i*j, i-1, p+ j]/j!*If[j==0, 1, x], {j, 0, n/i}]]]; T[n_] := Function[p, Table[ Coefficient[p, x, i], {i, 1, Exponent[p, x]}]][b[n, n, 0]]; Table[T[n], {n, 1, 25}] // Flatten (* Jean-François Alcover, Dec 10 2015, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Jan 19 2014

A235999 Triangle read by rows: T(n,k) = 2^k*A235998(n,k), n>=1, k>=1.

Original entry on oeis.org

2, 4, 4, 8, 6, 20, 4, 56, 8, 88, 48, 4, 176, 144, 8, 272, 448, 6, 428, 1168, 8, 688, 2496, 384, 4, 1044, 5416, 1344, 12, 1584, 10864, 4608, 4, 2424, 21328, 13152, 8, 3800, 40096, 35616, 8, 5656, 76336, 84864, 3840, 10, 8952, 140248, 200224, 15360
Offset: 1

Views

Author

Omar E. Pol, Jan 19 2014

Keywords

Comments

T(n,k) is also the number of overcompositions of n having k distinct parts. For the definition of overcomposition see A236002.
Row n has length A003056(n) hence the first element of column k is in row A000217(k).
Row sums give A236002, n >= 1.
Column 1 is A062011.
T(k*(k+1)/2,k) = T(A000217(k),k) = A000165(k) = (2*k)!!. - Alois P. Heinz, Jan 20 2014

Examples

			Triangle begins:
2;
4;
4,     8;
6,    20;
4,    56;
8,    88,     48;
4,   176,    144;
8,   272,    448;
6,   428,   1168;
8,   688,   2496,    384;
4,  1044,   5416,   1344;
12, 1584,  10864,   4608;
4,  2424,  21328,  13152;
8,  3800,  40096,  35616;
8,  5656,  76336,  84864,  3840;
10, 8952, 140248, 200224, 15360;
...
		

Crossrefs

Extensions

More terms from Alois P. Heinz, Jan 20 2014

A236633 Number of overcompositions of n minus the number of compositions of n.

Original entry on oeis.org

0, 1, 2, 8, 18, 44, 112, 260, 600, 1346, 3064, 6784, 15020, 32812, 71328, 154320, 332026, 711500, 1518384, 3229044, 6843256, 14464760, 30487496, 64112960, 134515472, 281671698, 588680628, 1228211140, 2558366188, 5321151540, 11052034932, 22925310868
Offset: 0

Views

Author

Omar E. Pol, Feb 02 2014

Keywords

Comments

Number of overcompositions of n that contain at least one overlined part.

Examples

			For n = 3 the number of overcompositions of 3 is A236002(3) = 12 and the number of compositions of 3 is A011782(3) = 4, so a(3) = 12 - 4 = 8.
On the other hand, the 12 overcompositions of 3 are [3], [3'], [1, 2], [1', 2], [1, 2'], [1', 2'], [2, 1], [2', 1], [2, 1'], [2', 1'], [1, 1, 1], [1', 1, 1]. There are 8 overcompositions with at least one overlined part, so a(3) = 8.
		

Crossrefs

Formula

a(n) = A236002(n) - A011782(n).

A236625 Total number of parts in all overcompositions of n.

Original entry on oeis.org

0, 2, 6, 24, 66, 180, 496, 1272, 3202, 7798, 18980, 45076, 106288, 246956, 568776, 1299184, 2944654, 6630660, 14838606, 33026000, 73126376, 161198136, 353812612, 773645124, 1685548792, 3660364490, 7924414752, 17107225340, 36832846344, 79107019964, 169505684844
Offset: 0

Views

Author

Omar E. Pol, Feb 01 2014

Keywords

Comments

For the definition of overcomposition see A236002.
The equivalent sequence for overpartitions is A235792.
Row sums of triangle A236628.

Examples

			For n = 3 the 12 overcompositions of 3 are [3], [3'], [1, 2], [1', 2], [1, 2'], [1', 2'], [2, 1], [2', 1], [2, 1'], [2', 1'], [1, 1, 1], [1', 1, 1]. There are 24 parts, so a(3) = 24.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, [p!, 0],
          `if`(i<1, 0, add((p-> p+[0, p[1]*j])(1/j!*
          `if`(j>0, 2, 1)*b(n-i*j, i-1, p+j)), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0)[2]:
    seq(a(n), n=0..35);  # Alois P. Heinz, Apr 28 2016
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, {p!, 0}, If[i < 1, {0, 0}, Sum[# + {0, #[[1]]*j}&[1/j!*If[j > 0, 2, 1]*b[n - i*j, i - 1, p + j]], {j, 0, n/i}]]];
    a[n_] := b[n, n, 0][[2]];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Nov 03 2022, after Alois P. Heinz *)

Extensions

a(6)-a(30) from Alois P. Heinz, Feb 02 2014

A237044 Number of overcompositions of n minus the number of partitions of n.

Original entry on oeis.org

0, 1, 2, 9, 21, 53, 133, 309, 706, 1572, 3534, 7752, 16991, 36807, 79385, 170528, 364563, 776739, 1649071, 3490698, 7366917, 15512544, 32583646, 68306009, 142902505, 298446956, 622232624, 1295316994, 2692580198, 5589582431, 11588900240, 23999045850
Offset: 0

Views

Author

Omar E. Pol, Feb 02 2014

Keywords

Crossrefs

Formula

a(n) = A236002(n) - A000041(n).

A237045 Number of overcompositions of n minus the number of overpartitions of n.

Original entry on oeis.org

0, 0, 0, 4, 12, 36, 104, 260, 628, 1448, 3344, 7464, 16564, 36180, 78480, 169232, 362732, 774172, 1645508, 3485788, 7360208, 15503432, 32571360, 68289536, 142880552, 298417848, 622194236, 1295266596, 2692514348, 5589496748, 11588789220, 23998902548
Offset: 0

Views

Author

Omar E. Pol, Feb 02 2014

Keywords

Comments

Number of overcompositions of n that contain at least two parts in increasing order.

Examples

			Illustration of a(4) = -6 with both overcompositions and overpartitions in colexicographic order.
--------------------------------------------------------
.    Overcompositions of 4      Overpartitions of 4
--------------------------------------------------------
.    _ _ _ _                    _ _ _ _
1   |.| | | |  1', 1,  1,  1   |.| | | |  1', 1,  1,  1
2   |_| | | |  1,  1,  1,  1   |_| | | |  1,  1,  1,  1
3   |  .|.| |  2', 1', 1       |  .|.| |  2', 1', 1
4   |   |.| |  2,  1', 1       |   |.| |  2,  1', 1
5   |  .| | |  2', 1,  1       |  .| | |  2', 1,  1
6   |_ _| | |  2,  1,  1       |_ _| | |  2,  1,  1
7  *|.|  .| |  1', 2', 1       |    .|.|  3', 1
8  *| |  .| |  1,  2', 1       |     |.|  3,  1
9  *|.|   | |  1', 2,  1       |    .| |  3', 1
10 *|_|   | |  1,  2,  1       |_ _ _| |  3,  1
11  |    .|.|  3', 1'          |  .|   |  2', 2
12  |     |.|  3,  1'          |_ _|   |  2,  2
13  |    .| |  3', 1           |      .|  4'
14  |_ _ _| |  3,  1           |_ _ _ _|  4
15 *|.| |  .|  1', 1,  2'
16 *| | |  .|  1,  1,  2'
17 *|.| |   |  1', 1,  2
18 *|_| |   |  1,  1,  2
19  |  .|   |  2', 2
20  |_ _|   |  2,  2
21 *|.|    .|  1', 3'
22 *| |    .|  1,  3'
23 *|.|     |  1', 3
24 *|_|     |  1,  3
25  |      .|  4'
26  |_ _ _ _|  4
.
There are 26 overcompositions of 4 and there are 14 overpartitions of 4, so the difference is a(4) = 26 - 14 = 12.
On the other hand there are 12 overcompositions of 4 that contain at least two parts in increasing order, so a(4) = 12.
		

Crossrefs

Formula

a(n) = A236002(n) - A015128(n).

A228820 Sum of positive F-ranks of all compositions of n. Also, sum of positive L-ranks of all compositions of n (see comments lines for definition).

Original entry on oeis.org

0, 0, 1, 3, 9, 24, 60, 145, 342, 791, 1800, 4041, 8971, 19733, 43077, 93441, 201592, 432867, 925574, 1971633, 4185537, 8857634, 18691421, 39339638, 82599634, 173050951, 361825484, 755140789, 1573359111, 3273103135, 6799507189, 14106802811, 29231731788
Offset: 0

Views

Author

Omar E. Pol, Sep 05 2013

Keywords

Comments

Here, the F-rank of a composition is defined by 2^(F-1) - N, where F is the first part and N is the number of parts. For example: the F-rank of the composition [6, 2, 1, 1] is (2^5 - 4) = 28.
Also, the L-rank of a composition is defined by 2^(L-1) - N, where L is the last part and N is the number of parts. For example: the L-rank of the composition [6, 2, 1, 1] is (2^0 - 4) = -3.
The sum of all F-ranks of all compositions of n is 0.
The sum of all L-ranks of all compositions of n is 0.
a(n) is also the sum of nonnegative terms in the n-th row of triangle A228821.
Note that in the table 1 (see example) the L-rank of the j-th composition is also the number of parts of the j-th region of the diagram minus the number of parts of the j-th composition. Also, note that in the table 2 the F-rank of the j-th composition is also the number of parts of the j-th region of the diagram minus the number of parts of the j-th composition. The same for all positive integers.
From Omar E. Pol, Feb 07 2014: (Start)
Also, the little F-rank of an overcomposition is defined by (2^(F-1) - N)/(2^D), where F is the first part, N is the number of parts and D is the number of distinct parts. For example: the little F-rank of the overcomposition [6, 2, 1, 1] is (2^5 - 4)/(2^3) = 7/2.
Also, the little L-rank of an overcomposition is defined by (2^(L-1) - N)/(2^D), where L is the last part, N is the number of parts and D is the number of distinct parts. For example: the little L-rank of the overcomposition [6, 2, 1, 1] is (2^0 - 4)/(2^3) = -3/8.
The sum of all little F-ranks of all overcompositions of n is 0.
The sum of all little L-ranks of all overcompositions of n is 0.
a(n) is also the sum of positive little F-ranks of all overcompositions of n.
a(n) is also the sum of positive little L-ranks of all overcompositions of n.
For the definition of overcomposition see A236002.
(End)

Examples

			Table 1. Compositions of 4 in lexicographic order.
---------------------------------------------------------
j   Composition   Diagram       F-rank          L-rank
---------------------------------------------------------
.                 _ _ _ _
1    [1,1,1,1]   | | | |_|    1 - 4 = -3      1 - 4 = -3
2    [1,1,2]     | | |_ _|    1 - 3 = -2      2 - 3 = -1
3    [1,2,1]     | |   |_|    1 - 3 = -2      1 - 3 = -2
4    [1,3]       | |_ _ _|    1 - 2 = -1      4 - 2 =  2
5    [2,1,1]     |   | |_|    2 - 3 = -1      1 - 3 = -2
6    [2,2]       |   |_ _|    2 - 2 =  0      2 - 2 =  0
7    [3,1]       |     |_|    4 - 2 =  2      1 - 2 = -1
8    [4]         |_ _ _ _|    8 - 1 =  7      8 - 1 =  7
                                      ---             ---
Total sum:                             0               0
Sum of positive terms:                 9               9
.
Table 2. Compositions of 4 in colexicographic order.
---------------------------------------------------------
j   Composition   Diagram       F-rank          L-rank
---------------------------------------------------------
.                 _ _ _ _
1    [1,1,1,1]   |_| | | |    1 - 4 = -3      1 - 4 = -3
2      [2,1,1]   |_ _| | |    2 - 3 = -1      1 - 3 = -2
3      [1,2,1]   |_|   | |    1 - 3 = -2      1 - 3 = -2
4        [3,1]   |_ _ _| |    4 - 2 =  2      1 - 2 = -1
5      [1,1,2]   |_| |   |    1 - 3 = -2      2 - 3 = -1
6        [2,2]   |_ _|   |    2 - 2 =  0      2 - 2 =  0
7        [1,3]   |_|     |    1 - 2 = -1      4 - 2 =  2
8          [4]   |_ _ _ _|    8 - 1 =  7      8 - 1 =  7
                                      ---             ---
Total sum:                             0               0
Sum of positive terms:                 9               9
.
The sum of positive F-ranks of all compositions of 4 is 2+7 = 9, the same as the sum of positive L-ranks, so a(4) = 9.
		

Crossrefs

Programs

  • Maple
    a:= n-> add(add(binomial(n-k-1, i-2)*(2^(k-1)-i),
            i=1..min(2^(k-1)-1, n-k+1)), k=1..n):
    seq(a(n), n=0..50);  # Alois P. Heinz, Sep 09 2013
  • Mathematica
    a[n_] := Sum[Sum[Binomial[n-k-1, i-2]*(2^(k-1)-i), {i, 1, Min[2^(k-1) - 1, n - k + 1]}], {k, 1, n}]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Feb 21 2017, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Sep 09 2013

A236626 Sum of all parts of all overcompositions of n.

Original entry on oeis.org

2, 8, 36, 104, 300, 864, 2268, 5824, 14418, 35760, 85888, 204816, 479804, 1113280, 2560560, 5836704, 13209612, 29690208, 66332572, 147350880, 325780056, 716862256, 1571067072, 3429697920, 7461222850, 16178111560, 34973640108, 75392349648
Offset: 1

Views

Author

Omar E. Pol, Feb 01 2014

Keywords

Comments

For the definition of overcomposition see A236002.
The equivalent sequence for overpartitions is A235793.

Examples

			For n = 3 the 12 overcompositions of 3 are [3], [3'], [1, 2], [1', 2], [1, 2'], [1', 2'], [2, 1], [2', 1], [2, 1'], [2', 1'], [1, 1, 1], [1', 1, 1], hence the sum of all parts is 3+3+1+2+1+2+1+2+1+2+2+1+2+1+2+1+2+1+1+1+1+1+1+1 = 3*12 = 36, so a(3) = 36.
		

Crossrefs

Formula

a(n) = n*A236002(n).

A236628 Triangle read by rows in which T(n,k) is the number of parts in the k-th region of the set of overcompositions of n, with overcompositions in colexicographic order.

Original entry on oeis.org

2, 2, 4, 2, 6, 4, 12, 2, 6, 4, 14, 4, 6, 4, 26
Offset: 1

Views

Author

Omar E. Pol, Feb 01 2014

Keywords

Comments

Right border gives A236002, n >= 1.
Row sums give A236625, n >= 1.

Examples

			Written as an irregular triangle in which row n has length 2^n the sequence begins:
2;
2, 4;
2, 6, 4, 12;
2, 6, 4, 14, 4, 6, 4, 26;
...
For n = 3 the diagram shows the four regions of the overcompositions of 3, with overcompositions in colexicographic order.
------------------------------------------------
.  Diagram of            Regions of the diagram
overcompositions        ------------------------
.    of 3                k: 1     2   3       4
------------------------------------------------
.    _ _ _                  _     _           _
1   |.| | |                |.|   | |         | |
2   |_| | |                |_|  _| |         | |
3   |  .|.|                    |  .|         |.|
4   |   |.|                    |   |         |.|
5   |  .| |                    |  .|         | |
6   |_ _| |                    |_ _|  _     _| |
7   |.|  .|                          |.|   |  .|
8   | |  .|                          | |   |  .|
9   |.|   |                          |.|   |   |
10  |_|   |                          |_|  _|   |
11  |    .|                              |    .|
12  |_ _ _|                              |_ _ _|
...
Number of parts.........:   2     6   4      12
.
Every row of every region contains only one part.
		

Crossrefs

A237272 Number of overcompositions of n that contain at least two parts in increasing order and that contain at least one overlined part.

Original entry on oeis.org

0, 0, 0, 3, 9, 27, 83, 211, 522, 1222, 2874, 6496, 14593, 32185, 70423, 153024, 330195, 708933, 1514821, 3224134, 6836547, 14455648, 30475210, 64096487, 134493519, 281642590, 588642240, 1228160742, 2558300338, 5321065857, 11051923912, 22925167566
Offset: 0

Views

Author

Omar E. Pol, Feb 09 2014

Keywords

Comments

Number of overcompositions of n minus the number of overpartitions of n plus the number of partitions of n minus the number of compositions of n.

Crossrefs

Formula

a(n) = A236002(n) - A015128(n) + A000041(n) - A011782(n) = A236002(n) - A230441(n) - A011782(n) = A237045(n) - A056823(n).
Showing 1-10 of 13 results. Next