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 38 results. Next

A286001 A table of partitions into consecutive parts (see Comments lines for definition).

Original entry on oeis.org

1, 2, 3, 1, 4, 2, 5, 2, 6, 3, 1, 7, 3, 2, 8, 4, 3, 9, 4, 2, 10, 5, 3, 1, 11, 5, 4, 2, 12, 6, 3, 3, 13, 6, 4, 4, 14, 7, 5, 2, 15, 7, 4, 3, 1, 16, 8, 5, 4, 2, 17, 8, 6, 5, 3, 18, 9, 5, 3, 4, 19, 9, 6, 4, 5, 20, 10, 7, 5, 2, 21, 10, 6, 6, 3, 1, 22, 11, 7, 4, 4, 2, 23, 11, 8, 5, 5, 3, 24, 12, 7, 6, 6, 4, 25, 12, 8, 7, 3, 5
Offset: 1

Views

Author

Omar E. Pol, Apr 30 2017

Keywords

Comments

This is a triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists successive blocks of k consecutive terms, where the m-th block starts with m, m>=1, and the first element of column k is in row k*(k+1)/2.
The partitions of n into consecutive parts are represented from the row n up to row A288529(n) as maximum, but in increasing order, exclusively in the columns where the blocks begin.
More precisely, the partition of n into exactly k consecutive parts (if such partition exists) is represented in the column k from the row n up to row n + k - 1 (see examples).
A288772(n) is the minimum number of rows that are required to represent in this table the partitions of all positive integers <= n into consecutive parts.
A288773(n) is the largest of all positive integers whose partitions into consecutive parts can be totally represented in the first n rows of this table.
A288774(n) is the largest positive integers whose partitions into consecutive parts can be totally represented in the first n rows of this table.
For a theorem related to this table see A286000.

Examples

			Triangle begins:
1;
2;
3,   1;
4,   2;
5,   2;
6,   3,  1;
7,   3,  2;
8,   4,  3;
9,   4,  2;
10,  5,  3,  1;
11,  5,  4,  2;
12,  6,  3,  3;
13,  6,  4,  4;
14,  7,  5,  2;
15,  7,  4,  3,  1;
16,  8,  5,  4,  2;
17,  8,  6,  5,  3;
18,  9,  5,  3,  4;
19,  9,  6,  4,  5;
20, 10,  7,  5,  2;
21, 10,  6,  6,  3,  1;
22, 11,  7,  4,  4,  2;
23, 11,  8,  5,  5,  3;
24, 12,  7,  6,  6,  4;
25, 12,  8,  7,  3,  5;
26, 13,  9,  5,  4,  6;
27, 13,  8,  6,  5,  2;
28, 14,  9,  7,  6,  3,  1;
...
Figures A..G show the location (in the columns of the table) of the partitions of n = 1..7 (respectively) into consecutive parts:
.   ------------------------------------------------------------------------
Fig:   A     B       C         D          E            F             G
.   ------------------------------------------------------------------------
. n:   1     2       3         4          5            6             7
Row ------------------------------------------------------------------------
1   | [1];|  1; |  1;     |  1;    |  1;        |  1;         |  1;        |
2   |     | [2];|  2;     |  2;    |  2;        |  2;         |  2;        |
3   |     |     | [3],[1];|  3,  1;|  3,  1;    |  3,  1;     |  3,  1;    |
4   |     |     |  4 ,[2];| [4], 2;|  4,  2;    |  4,  2;     |  4,  2;    |
5   |     |     |         |        | [5],[2];   |  5,  2;     |  5,  2;    |
6   |     |     |         |        |  6, [3], 3;| [6], 3, [1];|  6,  3,  1;|
7   |     |     |         |        |            |  7,  3, [2];| [7],[3], 2;|
8   |     |     |         |        |            |  8,  4, [3];|  8, [4], 3;|
.   ------------------------------------------------------------------------
Figure F: for n = 6 the partitions of 6 into consecutive parts (but with the parts in increasing order) are [6] and [1, 2, 3]. These partitions have 1 and 3 consecutive parts respectively. On the other hand  we can find the mentioned partitions in the columns 1 and 3 of this table, starting at the row 6.
.
Figures H..K show the location (in the columns of the table) of the partitions of 8..11 (respectively) into consecutive parts:
.    --------------------------------------------------------------------
Fig:        H             I                  J                 K
.    --------------------------------------------------------------------
. n:        8             9                  10                11
Row  --------------------------------------------------------------------
1    |  1;        |  1;            |   1;             |   1;            |
1    |  2;        |  2;            |   2;             |   2;            |
3    |  3,  1;    |  3,  1;        |   3,  1;         |   3,  1;        |
4    |  4,  2;    |  4,  2;        |   4,  2;         |   4,  2;        |
5    |  5,  2;    |  5,  2;        |   5,  2;         |   5,  2;        |
6    |  6,  3,  3;|  6,  3,  1;    |   6,  3,  1;     |   6,  3,  1;    |
7    |  7,  3,  2;|  7,  3,  2;    |   7,  3,  2;     |   7,  3,  2;    |
8    | [8], 4,  1;|  8,  4,  3;    |   8,  4,  3;     |   8,  4,  3;    |
9    |            | [9],[4],[2];   |   9,  4,  2;     |   9,  4,  2;    |
10   |            | 10, [5],[3], 1;| [10], 5,  3, [1];|  10,  5,  3,  1;|
11   |            | 11,  5, [4], 2;|  11,  5,  4, [2];| [11],[5], 4,  2;|
12   |            |                |  12,  6,  3, [3];|  12, [6], 3,  3;|
13   |            |                |  13,  6,  4, [4];|  13,  6,  4,  4;|
.    --------------------------------------------------------------------
Figure J: For n = 10 the partitions of 10 into consecutive parts (but with the parts in increasing order) are [10] and [1, 2, 3, 4]. These partitions have 1 and 4 consecutive parts respectively. On the other hand, we can find the mentioned partitions in the columns 1 and 4 of this table, starting at the row 10.
.
Illustration of initial terms arranged into the diagram of the triangle A237591:
.                                                           _
.                                                         _|1|
.                                                       _|2 _|
.                                                     _|3  |1|
.                                                   _|4   _|2|
.                                                 _|5    |2 _|
.                                               _|6     _|3|1|
.                                             _|7      |3  |2|
.                                           _|8       _|4 _|3|
.                                         _|9        |4  |2 _|
.                                       _|10        _|5  |3|1|
.                                     _|11         |5   _|4|2|
.                                   _|12          _|6  |3  |3|
.                                 _|13           |6    |4 _|4|
.                               _|14            _|7   _|5|2 _|
.                             _|15             |7    |4  |3|1|
.                           _|16              _|8    |5  |4|2|
.                         _|17               |8     _|6 _|5|3|
.                       _|18                _|9    |5  |3  |4|
.                     _|19                 |9      |6  |4 _|5|
.                   _|20                  _|10    _|7  |5|2 _|
.                 _|21                   |10     |6   _|6|3|1|
.               _|22                    _|11     |7  |4  |4|2|
.             _|23                     |11      _|8  |5  |5|3|
.           _|24                      _|12     |7    |6 _|6|4|
.         _|25                       |12       |8   _|7|3  |5|
.       _|26                        _|13      _|9  |5  |4 _|6|
.     _|27                         |13       |8    |6  |5|2 _|
.    |28                           |14       |9    |7  |6|3|1|
...
The number of horizontal line segments in the n-th row of the diagram equals A001227(n), the number of partitions of n into consecutive parts.
.
From _Omar E. Pol_, Dec 15 2020: (Start)
The connection (described step by step) between the triangle of A299765 and the above geometric diagram is as follows:
.
   [1];                                       [1];
   [2];                                       [2];
   [3], [2, 1];                               [3], [2, 1];
   [4];                                       [4];
   [5], [3, 2];                               [5], [3, 2];
   [6], [3, 2, 1];                            [6],         [3, 2, 1];
   [7], [4, 3];                               [7], [4, 3];
   [8];                                       [8];
   [9], [5, 4], [4, 3, 2];                    [9], [5, 4], [4, 3, 2];
.
         Figure 1.                                   Figure 2.
.
We start with the irregular                Then we write the same triangle
triangle of A299765 in which               but ordered in columns where the
row n lists the partitions                 column k lists the partitions of
of n into consecutive parts.               n into k consecutive parts.
.
.   _                                          _
    1|                                        |1
    _                                          _
    2|                                        |2
    _    _ _                                   _      _
    3|   2,1|                                 |3     |1
    _                                          _     |2
    4|                                        |4
    _    _ _                                   _      _
    5|   3,2|                                 |5     |2
    _           _ _ _                          _     |3      _
    6|          3,2,1|                        |6            |1
    _    _ _                                   _      _     |2
    7|   4,3|                                 |7     |3     |3
    _                                          _     |4
    8|                                        |8
    _    _ _    _ _ _                          _      _      _
    9|   5,4|   4,3,2|                        |9     |4     |2
                                                     |5     |3
                                                            |4
.
         Figure 3.                                Figure 4.
.
Then we draw to the right of               Then we rotate each sub-diagram
each partition a vertical                  90 degrees counterclockwise.
toothpick and above each part              Every horizontal toothpick represents
we draw a horizontal toothpick.            the existence of that partition.
.                                          The number of vertical toothpicks
.                                          equals the number of parts.
.
.                     _                                      _
                    _|1                                    _|1
                  _|2 _                                  _|2 _
                _|3  |1                                _|3  |1
              _|4   _|2                              _|4   _|2
            _|5    |2 _                            _|5    |2 _
          _|6     _|3|1                          _|6     _|3|1
        _|7      |3  |2                        _|7      |3  |2
      _|8       _|4 _|3                      _|8       _|4 _|3
     |9        |4  |2                       |9        |4  |2
               |5  |3
                   |4
.
         Figure 5.                                Figure 6.
.
Then we join the sub-diagrams              Finally we erase the parts that
forming staircases (or zig-zag             are beyond a certain level (in
paths) that represent the                  this case beyond the 9th level)
partitions that have the same              to make the diagram more standard.
number of parts.
.
The numbers in the k-th staircase (from left to right) are the elements of the k-th column of the triangular array.
Note that this diagram is essentially the same diagram used to represent the triangles A237048, A235791, A237591, and other related sequences such as A001227, A060831 and A204217.
There is an infinite family of this kind of triangles, which are related to polygonal numbers and partitions into consecutive parts that differ by d. For more information see the theorems in A285914 and A303300.
Note that if we take two images of the diagram mirroring each other, with the y-axis in the middle of them, then a new diagram is formed, which is symmetric and represents the sequence A237593 as an isosceles triangle. Then if we fold each level (or row) of that isosceles triangle we essentially obtain the structure of the pyramid described in A245092 whose terraces at the n-th level have a total area equal to sigma(n) = A000203(n). (End)
		

Crossrefs

Another version of A286000.
Tables of the same family where the consecutive parts differ by d are A010766 (d=0), this sequence (d=1), A332266 (d=2), A334945 (d=3), A334618(d=4).

A286000 A table of partitions into consecutive parts (see Comments lines for definition).

Original entry on oeis.org

1, 2, 3, 2, 4, 1, 5, 3, 6, 2, 3, 7, 4, 2, 8, 3, 1, 9, 5, 4, 10, 4, 3, 4, 11, 6, 2, 3, 12, 5, 5, 2, 13, 7, 4, 1, 14, 6, 3, 5, 15, 8, 6, 4, 5, 16, 7, 5, 3, 4, 17, 9, 4, 2, 3, 18, 8, 7, 6, 2, 19, 10, 6, 5, 1, 20, 9, 5, 4, 6, 21, 11, 8, 3, 5, 6, 22, 10, 7, 7, 4, 5, 23, 12, 6, 6, 3, 4, 24, 11, 9, 5, 2, 3, 25, 13, 8, 4, 7, 2
Offset: 1

Views

Author

Omar E. Pol, Apr 30 2017

Keywords

Comments

This is a triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists successive blocks of k consecutive terms in decreasing order, where the m-th block starts with k + m - 1, m>=1, and the first element of column k is in the row k*(k+1)/2.
The partitions of n into consecutive parts are represented from the row n up to row A288529(n) as maximum, exclusively in the columns where the blocks begin.
More precisely, the partition of n into exactly k consecutive parts (if such partition exists) is represented in the column k from the row n up to row n + k - 1 (see examples).
A288772(n) is the minimum number of rows that are required to represent in this table the partitions of all positive integers <= n into consecutive parts.
A288773(n) is the largest of all positive integers whose partitions into consecutive parts can be totally represented in the first n rows of this table.
A288774(n) is the largest positive integers whose partitions into consecutive parts can be totally represented in the first n rows of this table.
Theorem: the smallest part of the partition of n into exactly k consecutive parts (if such partition exists) equals the number of positive integers <= n having a partition into exactly k consecutive parts.

Examples

			Table de partitions into consecutive parts (first 28 rows):
1;
2;
3,   2;
4,   1;
5,   3;
6,   2,  3;
7,   4,  2;
8,   3,  1;
9,   5,  4;
10,  4,  3,  4;
11,  6,  2,  3;
12,  5,  5,  2;
13,  7,  4,  1;
14,  6,  3,  5;
15,  8,  6,  4,  5;
16,  7,  5,  3,  4;
17,  9,  4,  2,  3;
18,  8,  7,  6,  2;
19, 10,  6,  5,  1;
20,  9,  5,  4,  6;
21, 11,  8,  3,  5,  6;
22, 10,  7,  7,  4,  5;
23, 12,  6,  6,  3,  4;
24, 11,  9,  5,  2,  3;
25, 13,  8,  4,  7,  2;
26, 12,  7,  8,  6,  1;
27, 14, 10,  7,  5,  7;
28, 13,  9,  6,  4,  6,  7;
...
Figures A..G show the location (in the columns of the table) of the partitions of n = 1..7 (respectively) into consecutive parts:
.   ------------------------------------------------------------------------
Fig:   A     B       C         D          E            F             G
.   ------------------------------------------------------------------------
. n:   1     2       3         4          5            6             7
Row ------------------------------------------------------------------------
1   | [1];|  1; |  1;     |  1;    |  1;        |  1;         |  1;        |
2   |     | [2];|  2;     |  2;    |  2;        |  2;         |  2;        |
3   |     |     | [3],[2];|  3;  2;|  3,  2;    |  3,  2;     |  3,  2;    |
4   |     |     |  4 ,[1];| [4], 1;|  4,  1;    |  4,  1;     |  4,  1;    |
5   |     |     |         |        | [5],[3];   |  5,  3;     |  5,  3;    |
6   |     |     |         |        |  6, [2], 3;| [6], 2, [3];|  6,  2,  3;|
7   |     |     |         |        |            |  7,  4, [2];| [7],[4], 2;|
8   |     |     |         |        |            |  8,  3, [1];|  8, [3], 1;|
.   ------------------------------------------------------------------------
Figure F: for n = 6 the partitions of 6 into consecutive parts are [6] and [3, 2, 1]. These partitions have 1 and 3 consecutive parts respectively. On the other hand  we can find the mentioned partitions in the columns 1 and 3 of this table, starting at the row 6.
.
Figures H..K show the location (in the columns of the table) of the partitions of 8..11 (respectively) into consecutive parts:
.    --------------------------------------------------------------------
Fig:        H             I                  J                 K
.    --------------------------------------------------------------------
. n:        8             9                  10                11
Row  --------------------------------------------------------------------
1    |  1;        |  1;            |   1;             |   1;            |
1    |  2;        |  2;            |   2;             |   2;            |
3    |  3,  2;    |  3,  2;        |   3,  2;         |   3,  2;        |
4    |  4,  1;    |  4,  1;        |   4,  1;         |   4,  1;        |
5    |  5,  3;    |  5,  3;        |   5,  3;         |   5,  3;        |
6    |  6,  2,  3;|  6,  2,  3;    |   6,  2,  3;     |   6,  2,  3;    |
7    |  7,  4,  2;|  7,  4,  2;    |   7,  4,  2;     |   7,  4,  2;    |
8    | [8], 3,  1;|  8,  3,  1;    |   8,  3,  1;     |   8,  3,  1;    |
9    |            | [9],[5],[4];   |   9,  5,  4;     |   9,  5,  4;    |
10   |            | 10, [4],[3], 4;| [10], 4,  3, [4];|  10,  4,  3;  4;|
11   |            | 11,  6, [2], 3;|  11,  6,  2; [3];| [11],[6], 2,  3;|
12   |            |                |  12,  5,  5, [2];|  12, [5], 5,  2;|
13   |            |                |  13,  7,  4, [1];|  13,  7,  4,  1;|
.    --------------------------------------------------------------------
Figure J: For n = 10 the partitions of 10 into consecutive parts are [10] and [4, 3, 2, 1]. These partitions have 1 and 4 consecutive parts respectively. On the other hand  we can find the mentioned partitions in the columns 1 and 4 of this table, starting at the row 10.
Illustration of initial terms arranged into the diagram of the triangle A237591:
.                                                           _
.                                                         _|1|
.                                                       _|2 _|
.                                                     _|3  |2|
.                                                   _|4   _|1|
.                                                 _|5    |3 _|
.                                               _|6     _|2|3|
.                                             _|7      |4  |2|
.                                           _|8       _|3 _|1|
.                                         _|9        |5  |4 _|
.                                       _|10        _|4  |3|4|
.                                     _|11         |6   _|2|3|
.                                   _|12          _|5  |5  |2|
.                                 _|13           |7    |4 _|1|
.                               _|14            _|6   _|3|5 _|
.                             _|15             |8    |6  |4|5|
.                           _|16              _|7    |5  |3|4|
.                         _|17               |9     _|4 _|2|3|
.                       _|18                _|8    |7  |6  |2|
.                     _|19                 |10     |6  |5 _|1|
.                   _|20                  _|9     _|5  |4|6 _|
.                 _|21                   |11     |8   _|3|5|6|
.               _|22                    _|10     |7  |7  |4|5|
.             _|23                     |12      _|6  |6  |3|4|
.           _|24                      _|11     |9    |5 _|2|3|
.         _|25                       |13       |8   _|4|7  |2|
.       _|26                        _|12      _|7  |8  |6 _|1|
.     _|27                         |14       |10   |7  |5|7 _|
.    |28                           |13       |9    |6  |4|6|7|
...
The number of horizontal line segments in the n-th row of the diagram equals A001227(n), the number of partitions of n into consecutive parts.
		

Crossrefs

Row n has length A003056(n).
The first element of column k is in row A000217(k).
For another version see A286001.

A299765 Irregular triangle read by rows, T(n,k), n >= 1, k >= 1, in which row n lists the partitions of n into consecutive parts, with the partitions ordered by increasing number of parts.

Original entry on oeis.org

1, 2, 3, 2, 1, 4, 5, 3, 2, 6, 3, 2, 1, 7, 4, 3, 8, 9, 5, 4, 4, 3, 2, 10, 4, 3, 2, 1, 11, 6, 5, 12, 5, 4, 3, 13, 7, 6, 14, 5, 4, 3, 2, 15, 8, 7, 6, 5, 4, 5, 4, 3, 2, 1, 16, 17, 9, 8, 18, 7, 6, 5, 6, 5, 4, 3, 19, 10, 9, 20, 6, 5, 4, 3, 2, 21, 11, 10, 8, 7, 6, 6, 5, 4, 3, 2, 1, 22, 7, 6, 5, 4, 23, 12, 11
Offset: 1

Views

Author

Omar E. Pol, Feb 26 2018

Keywords

Comments

In the triangle the first partition with m parts appears as the last partition in row A000217(m), m >= 1. - Omar E. Pol, Mar 23 2022
For m >= 0, row 2^m consists of just one element (2^m). - Paolo Xausa, May 24 2025

Examples

			Triangle begins:
   [1];
   [2];
   [3], [2, 1];
   [4];
   [5], [3, 2];
   [6], [3, 2, 1];
   [7], [4, 3];
   [8];
   [9], [5, 4], [4, 3, 2];
  [10], [4, 3, 2, 1];
  [11], [6, 5];
  [12], [5, 4, 3];
  [13], [7, 6];
  [14], [5, 4, 3, 2];
  [15], [8, 7], [6, 5, 4], [5, 4, 3, 2, 1];
  [16];
  [17], [9, 8];
  [18], [7, 6, 5], [6, 5, 4, 3];
  [19], [10, 9];
  [20], [6, 5, 4, 3, 2];
  [21], [11, 10], [8, 7, 6], [6, 5, 4, 3, 2, 1];
  [22], [7, 6, 5, 4];
  [23], [12, 11];
  [24], [9, 8, 7];
  [25], [13, 12], [7, 6, 5, 4, 3];
  [26], [8, 7, 6, 5];
  [27], [14, 13], [10, 9, 8], [7, 6, 5, 4, 3, 2];
  [28], [7, 6, 5, 4, 3, 2, 1];
...
Note that in the below diagram the number of horizontal line segments in the n-th row equals A001227(n), the number of partitions of n into consecutive parts, so we can find the partitions of n into consecutive parts as follows: consider the vertical blocks of numbers that start exactly in the n-th row of the diagram, for example: for n = 15 consider the vertical blocks of numbers that start exactly in the 15th row. They are [15], [8, 7], [6, 5, 4] and [5, 4, 3, 2, 1], equaling the 15th row of the above triangle.
.                                                           _
.                                                         _|1|
.                                                       _|2 _|
.                                                     _|3  |2|
.                                                   _|4   _|1|
.                                                 _|5    |3 _|
.                                               _|6     _|2|3|
.                                             _|7      |4  |2|
.                                           _|8       _|3 _|1|
.                                         _|9        |5  |4 _|
.                                       _|10        _|4  |3|4|
.                                     _|11         |6   _|2|3|
.                                   _|12          _|5  |5  |2|
.                                 _|13           |7    |4 _|1|
.                               _|14            _|6   _|3|5 _|
.                             _|15             |8    |6  |4|5|
.                           _|16              _|7    |5  |3|4|
.                         _|17               |9     _|4 _|2|3|
.                       _|18                _|8    |7  |6  |2|
.                     _|19                 |10     |6  |5 _|1|
.                   _|20                  _|9     _|5  |4|6 _|
.                 _|21                   |11     |8   _|3|5|6|
.               _|22                    _|10     |7  |7  |4|5|
.             _|23                     |12      _|6  |6  |3|4|
.           _|24                      _|11     |9    |5 _|2|3|
.         _|25                       |13       |8   _|4|7  |2|
.       _|26                        _|12      _|7  |8  |6 _|1|
.     _|27                         |14       |10   |7  |5|7 _|
.    |28                           |13       |9    |6  |4|6|7|
...
The diagram is infinite. For more information about the diagram see A286000.
For an amazing connection with sum of divisors function (A000203) see A237593.
		

Crossrefs

Row n has length A204217(n).
Row sums give A245579.
Right border gives A118235.
Column 1 gives A000027.
Records give A000027.
The number of partitions into consecutive parts in row n is A001227(n).
For tables of partitions into consecutive parts see A286000 and A286001.
Cf. A328365 (mirror).
Cf. A352425 (a subsequence).

Programs

  • Mathematica
    intervals[n_]:=Module[{x,y},SolveValues[(x^2-y^2+x+y)/2==n&&0A299765row[n_]:=Flatten[SortBy[Map[Range[First[#],Last[#],-1]&,intervals[n]],Length]];
    nrows=25;Array[A299765row,nrows] (* Paolo Xausa, Jun 19 2022 *)
  • PARI
    iscons(p) = my(v = vector(#p-1, k, p[k+1] - p[k])); v == vector(#p-1, i, 1);
    row(n) = my(list = List()); forpart(p=n, if (iscons(p), listput(list, Vecrev(p)));); Vec(list); \\ Michel Marcus, May 11 2022

Extensions

Name clarified by Omar E. Pol, May 11 2022

A285914 Irregular triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists k's interleaved with k-1 zeros, and the first element of column k is in row k(k+1)/2.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Apr 28 2017

Keywords

Comments

Conjecture 1: T(n,k) is the number of parts in the partition of n into k consecutive parts, if T(n,k) > 0.
Conjecture 2: row sums give A204217, which should be also the total number of parts in all partitions of n into consecutive parts.
(The conjectures are true. See Joerg Arndt's proof in the Links section.) - Omar E. Pol, Jun 14 2017
From Omar E. Pol, May 05 2020: (Start)
Theorem: Let T(n,k) be an irregular triangle read by rows in which column k lists k's interleaved with k-1 zeros, and the first element of column k is in the row that is the k-th (m+2)-gonal number, with n >= 1, k >= 1, m >= 0. T(n,k) is also the number of parts in the partition of n into k consecutive parts that differ by m, including n as a valid partition. Hence the sum of row n gives the total number of parts in all partitions of n into consecutive parts that differ by m.
About the above theorem, this is the case for m = 1. For m = 0 see the triangle A127093, in which row sums give A000203. For m = 2 see the triangle A330466, in which row sums give A066839 (conjectured). For m = 3 see the triangle A330888, in which row sums give A330889.
Note that there are infinitely many triangles of this kind, with m >= 0. Also, every triangle can be represented with a diagram of overlapping curves, in which every column of triangle is represented by a periodic curve. (End)

Examples

			Triangle begins (rows 1..28):
1;
1;
1,  2;
1,  0;
1,  2;
1,  0,  3;
1,  2,  0;
1,  0,  0;
1,  2,  3;
1,  0,  0,  4;
1,  2,  0,  0;
1,  0,  3,  0;
1,  2,  0,  0;
1,  0,  0,  4;
1,  2,  3,  0,  5;
1,  0,  0,  0,  0;
1,  2,  0,  0,  0;
1,  0,  3,  4,  0;
1,  2,  0,  0,  0;
1,  0,  0,  0,  5;
1,  2,  3,  0,  0,  6;
1,  0,  0,  4,  0,  0;
1,  2,  0,  0,  0,  0;
1,  0,  3,  0,  0,  0;
1,  2,  0,  0,  5,  0;
1,  0,  0,  4,  0,  0;
1,  2,  3,  0,  0,  6;
1,  0,  0,  0,  0,  0,  7;
...
In accordance with the conjectures, for n = 15 there are four partitions of 15 into consecutive parts: [15], [8, 7], [6, 5, 4] and [5, 4, 3, 2, 1]. These partitions are formed by 1, 2, 3 and 5 consecutive parts respectively, so the 15th row of the triangle is [1, 2, 3, 0, 5].
Illustration of initial terms:
Row                                                         _
1                                                         _|1|
2                                                       _|1 _|
3                                                     _|1  |2|
4                                                   _|1   _|0|
5                                                 _|1    |2 _|
6                                               _|1     _|0|3|
7                                             _|1      |2  |0|
8                                           _|1       _|0 _|0|
9                                         _|1        |2  |3 _|
10                                      _|1         _|0  |0|4|
11                                    _|1          |2   _|0|0|
12                                  _|1           _|0  |3  |0|
13                                _|1            |2    |0 _|0|
14                              _|1             _|0   _|0|4 _|
15                            _|1              |2    |3  |0|5|
16                          _|1               _|0    |0  |0|0|
17                        _|1                |2     _|0 _|0|0|
18                      _|1                 _|0    |3  |4  |0|
19                    _|1                  |2      |0  |0 _|0|
20                  _|1                   _|0     _|0  |0|5 _|
21                _|1                    |2      |3   _|0|0|6|
22              _|1                     _|0      |0  |4  |0|0|
23            _|1                      |2       _|0  |0  |0|0|
24          _|1                       _|0      |3    |0 _|0|0|
25        _|1                        |2        |0   _|0|5  |0|
26      _|1                         _|0       _|0  |4  |0 _|0|
27    _|1                          |2        |3    |0  |0|6 _|
28   |1                            |0        |0    |0  |0|0|7|
...
Note that the k's are placed exactly below the k-th horizontal line segment of every row.
The above structure is related to the triangle A237591, also to the left-hand part of the triangle A237593, and also to the left-hand part of the front view of the pyramid described in A245092.
		

Crossrefs

Row n has length A003056(n).
Column k starts in row A000217(k).
The number of positive terms in row n is A001227(n), the number of partitions of n into consecutive parts.
Triangles of the same family are A127093, this sequence, A330466, A330888.

Programs

  • Mathematica
    With[{nn = 6}, Table[Boole[If[EvenQ@ k, Mod[(n - k/2), k] == 0, Mod[n, k] == 0]] k, {n, nn (nn + 3)/2}, {k, Floor[((Sqrt[8 n + 1] - 1)/2)]}]] // Flatten (* Michael De Vlieger, Jun 15 2017, after Python by Indranil Ghosh *)
  • PARI
    t(n, k) = if (k % 2, (n % k) == 0, ((n - k/2) % k) == 0); \\ A237048
    tabf(nn) = {for (n=1, nn, for (k=1, floor((sqrt(1+8*n)-1)/2), print1(k*t(n, k), ", "); ); print(); ); } \\ Michel Marcus, Nov 04 2019
  • Python
    from sympy import sqrt
    import math
    def a237048(n, k):
        return int(n%k == 0) if k%2 else int(((n - k//2)%k) == 0)
    def T(n, k): return k*a237048(n, k)
    for n in range(1, 29): print([T(n, k) for k in range(1, int(math.floor((sqrt(8*n + 1) - 1)/2)) + 1)]) # Indranil Ghosh, Apr 30 2017
    

Formula

T(n,k) = k*A237048(n,k).

A335616 a(n) is twice the number of partitions of n into consecutive parts, minus the number of partitions of n into consecutive parts that contain 1 as a part.

Original entry on oeis.org

1, 2, 3, 2, 4, 3, 4, 2, 6, 3, 4, 4, 4, 4, 7, 2, 4, 6, 4, 4, 7, 4, 4, 4, 6, 4, 8, 3, 4, 8, 4, 2, 8, 4, 8, 5, 4, 4, 8, 4, 4, 8, 4, 4, 11, 4, 4, 4, 6, 6, 8, 4, 4, 8, 7, 4, 8, 4, 4, 8, 4, 4, 12, 2, 8, 7, 4, 4, 8, 8, 4, 6, 4, 4, 12, 4, 8, 7, 4, 4, 10, 4, 4, 8, 8, 4, 8, 4, 4, 12, 7, 4, 8, 4, 8, 4, 4, 6, 12, 6
Offset: 1

Views

Author

Omar E. Pol, Oct 02 2020

Keywords

Comments

a(n) is twice the number of partitions of n into consecutive parts, minus the number of partitions of n into distinct parts such that the greatest part equals the number of all parts.
For a visualization of the sequence, consider a diagram formed for infinitely many double staircases as shown in the Example section.
a(n) is the number of horizontal line segments (or steps) that are only in the n-th level of the structure, starting from the top.
The total length of all vertical line segments that are adjacent and below the steps of the n-th level of the structure equals twice the total number of parts in all partitions of n into consecutive parts.
Note that in the n-th double staircase the top step is located in the level A000217(n), n >= 1, every horizontal line segment has length 1, and every vertical line segment has length n.
a(n) is also the number of horizontal line segments of length 1 or 2 in the n-th level of the similar diagram used to represent the sequence A237593 and other isosceles triangles related to A237593.
a(n) is odd if and only if n is a nonzero triangular number (A000217).
Double-staircases theorem of the sum of divisors: the total number of steps from level n to the top of all the odd-indexed double staircases that have at least one step in the level n, minus the total number of steps from the level n to the top of all the even-indexed double staircases that have at least one step in the level n equals sigma(n) = A000203(n).
The above theorem shows a symmetry of sigma in accordance with the symmetric Dyck Paths described in A237593 and with the pyramid described in A245092.
For the connection with the partitions into consecutive integers see also A196020, since we can see here that A196020(n,k) is also the number of steps in the first n levels of the k-th double staircase that has at least one step in the n-th level of the diagram, otherwise A196020(n,k) = 0. Also, it is the width of the mentioned staircase in n-th level of the diagram.
It appears that odd primes (A065091) are also the levels where there are steps in the staircases 1 and 2, but no step from other staircases.
It appears that powers of 2 (A000079) are also the levels where there are only one or two steps in total.
This sequence could be related to several other sequences (see the Crossrefs section of A262626).

Examples

			Illustration of initial terms:
n   a(n)                               Diagram
                                          _
1     1                                 _|1|_
2     2                               _|1 _ 1|_
3     3                             _|1  |1|  1|_
4     2                           _|1   _| |_   1|_
5     4                         _|1    |1 _ 1|    1|_
6     3                       _|1     _| |1| |_     1|_
7     4                     _|1      |1  | |  1|      1|_
8     2                   _|1       _|  _| |_  |_       1|_
9     6                 _|1        |1  |1 _ 1|  1|        1|_
10    3               _|1         _|   | |1| |   |_         1|_
11    4             _|1          |1   _| | | |_   1|          1|_
12    4           _|1           _|   |1  | |  1|   |_           1|_
13    4         _|1            |1    |  _| |_  |    1|            1|_
14    4       _|1             _|    _| |1 _ 1| |_    |_             1|_
15    7     _|1              |1    |1  | |1| |  1|    1|              1|_
16    2    |1                |     |   | | | |   |     |                1|
...
For n = 6 (above), the total number of steps in all double staircases that have at least one step in the 6th level of the structure is equal to 3, since there are two steps in the first double staircase, there are no steps in the second double staircase, and there is only one step in the third double staircase, so a(3) = 2 + 0 + 1 = 3.
From the theorem (see comments) for n = 6, let s(k) = A196020(6,k) be the total number of steps from level n to the top, in the k-th double staircase that has at least a step in the 6th level of the structure, otherwise s(k) = 0. We have that s(1) = 11, s(2) = 0 and s(3) = 1. So the alternating sum is 11 - 0 + 1 = 12, which equals sigma(6) = 1 + 2 + 3 + 6 = 12.
Note that to evaluate sigma(n), it is sufficient to have only the n-th level of the diagram, since the width of the base level of a double staircase equals the number of its steps. See below:
For n = 6 the 6th level of the above diagram looks like this:
                                _         _         _
                               |1      | |1| |      1|
.
Width of the 1st staircase:    |<-------- 11 ------->|
.
Width of the 3rd staircase:          --->|1|<---
.
The width of the first double staircase is 11, the width of the second double staircase does not count, and the width of the third double staircase is 1, so the alternating sum is 11 - 0 + 1 = 12 = sigma(6).
For n = 15 the alternating sum is 29 - 13 + 7 - 0 + 1 = 24 = sigma(15).
For n = 16 the alternating sum is 31 -  0 + 0 - 0 + 0 = 31 = sigma(16).
For more information about these alternating sums see A196020.
		

Crossrefs

Programs

  • Maple
    N:= 100:
    S := convert(series( add( x^(n*(n+1)/2)*(1 + x^n)/(1 - x^n), n = 1..floor(sqrt(2*N)) ), x, N+1 ), polynom):
    seq(coeff(S, x, n), n = 1..N); # Peter Bala, Jan 20 2021
  • Mathematica
    A335616[n_]:=2DivisorSigma[0,n/2^IntegerExponent[n,2]]-Boole[IntegerQ[(Sqrt[8n+1]-1)/2]];Array[A335616,100] (* Paolo Xausa, Sep 03 2023 *)

Formula

a(n) = 2*A001227(n) - A010054(n).
a(n) = A054844(n) - A010054(n).
a(n) = 2*A136107(n) + A010054(n). - Omar E. Pol, Nov 27 2020
G.f.: Sum_{n >= 1} x^(n*(n+1)/2)*(1 + x^n)/(1 - x^n). Cf. A000005 with g.f. Sum_{n >= 1} x^(n^2)*(1 + x^n)/(1 - x^n). - Peter Bala, Jan 20 2021

Extensions

Simpler definition from Omar E. Pol, Nov 27 2020

A286013 Irregular triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists the positive integers starting with k, interleaved with k-1 zeros, and the first element of column k is in row k(k+1)/2.

Original entry on oeis.org

1, 2, 3, 2, 4, 0, 5, 3, 6, 0, 3, 7, 4, 0, 8, 0, 0, 9, 5, 4, 10, 0, 0, 4, 11, 6, 0, 0, 12, 0, 5, 0, 13, 7, 0, 0, 14, 0, 0, 5, 15, 8, 6, 0, 5, 16, 0, 0, 0, 0, 17, 9, 0, 0, 0, 18, 0, 7, 6, 0, 19, 10, 0, 0, 0, 20, 0, 0, 0, 6, 21, 11, 8, 0, 0, 6, 22, 0, 0, 7, 0, 0, 23, 12, 0, 0, 0, 0, 24, 0, 9, 0, 0, 0, 25, 13, 0, 0, 7, 0
Offset: 1

Views

Author

Omar E. Pol, Apr 30 2017

Keywords

Comments

Conjecture 1: T(n,k) is the largest part of the partition of n into k consecutive parts, if T(n,k) > 0.
Conjecture 2: row sums give A286015.
Trapezoidal interpretation from Peter Munn, Jun 18 2017: (Start)
There is one to one correspondence between nonzero T(n,k) and trapezoidal area patterns of n dots on a triangular grid, if we include the limiting cases of triangular patterns, straight lines (k=1) or a single dot (k=n=1). The corresponding pattern has T(n,k) dots in its longest side, k dots in the two adjacent sides and T(n,k)-k+1 dots in the fourth side (where a count of 1 dot may be understood as signifying that side's absence).
Reason: From the definition, for k >= 1, m >= 0, T(A000217(k)+km,k) = k+m, where A000217(k) = k(k+1)/2, the k-th triangular number. First element of column k is T(A000217(k),k) = k: this matches a triangular pattern of A000217(k) dots with 3 sides of k dots. Looking at this pattern as k rows of 1..k dots, extend each row by m dots to create a trapezoidal pattern of A000217(k)+km dots with a longest side of k+m dots and adjacent sides of k dots: this matches T(A000217(k)+km,k) = k+m. As nonzero elements in column k occur at intervals of k, every nonzero T(n,k) has a match. Every trapezoidal pattern can be produced by extending a triangular pattern as described, so they all have a match.
The truth of conjecture 1 follows, since each nonzero T(n,k) = k+m corresponds to a trapezoidal pattern of n dots having k rows with lengths (1+m)..(k+m).
The A270877 sieve is related to this sequence because it eliminates n if it is the sum of consecutive numbers whose largest term has survived the sifting (which may likewise be seen in terms of a trapezoidal dot pattern and its longest side). So the sieve eliminates n if any lesser numbers in A270877 are in row n of this sequence.
(End)

Examples

			Triangle begins:
1;
2;
3,   2;
4,   0;
5,   3;
6,   0,  3;
7,   4,  0;
8,   0,  0;
9,   5,  4;
10,  0,  0,  4;
11,  6,  0,  0;
12,  0,  5,  0;
13,  7,  0,  0;
14,  0,  0,  5;
15,  8,  6,  0,  5;
16,  0,  0,  0,  0;
17,  9,  0,  0,  0;
18,  0,  7,  6,  0;
19, 10,  0,  0,  0;
20,  0,  0,  0,  6;
21, 11,  8,  0,  0,  6;
22,  0,  0,  7,  0,  0;
23, 12,  0,  0,  0,  0;
24,  0,  9,  0,  0,  0;
25, 13,  0,  0,  7,  0;
26,  0,  0,  8,  0,  0;
27, 14, 10,  0,  0,  7;
28,  0,  0,  0,  0,  0,  7;
...
In accordance with the conjecture, for n = 15 there are four partitions of 15 into consecutive parts: [15], [8, 7], [6, 5, 4] and [5, 4, 3, 2, 1]. The largest parts are 15, 8, 6, 5, respectively, so the 15th row of the triangle is [15, 8, 6, 0, 5].
		

Crossrefs

Row n has length A003056(n).
Column k starts in row A000217(k).
The number of positive terms in row n is A001227(n), the number of partitions of n into consecutive parts.
The last positive term in row n is in column A109814(n).

Programs

  • Mathematica
    With[{n = 7}, DeleteCases[#, m_ /; m < 0] & /@ Transpose@ Table[Apply[Join @@ {ConstantArray[-1, #2 - 1], Array[(k + #/k) Boole[Mod[#, k] == 0] &, #1 - #2 + 1, 0]} &, # (# + 1)/2 & /@ {n, k}], {k, n}]] // Flatten (* Michael De Vlieger, Jul 21 2017 *)

Formula

For k >= 1, m >= 0, T(A000217(k)+km,k) = k+m. - Peter Munn, Jun 19 2017

A328365 Irregular triangle read by rows, T(n,k), n >= 1, k >= 1, in which row n lists in reverse order the partitions of n into consecutive parts.

Original entry on oeis.org

1, 2, 1, 2, 3, 4, 2, 3, 5, 1, 2, 3, 6, 3, 4, 7, 8, 2, 3, 4, 4, 5, 9, 1, 2, 3, 4, 10, 5, 6, 11, 3, 4, 5, 12, 6, 7, 13, 2, 3, 4, 5, 14, 1, 2, 3, 4, 5, 4, 5, 6, 7, 8, 15, 16, 8, 9, 17, 3, 4, 5, 6, 5, 6, 7, 18, 9, 10, 19, 2, 3, 4, 5, 6, 20, 1, 2, 3, 4, 5, 6, 6, 7, 8, 10, 11, 21, 4, 5, 6, 7, 22, 11, 12, 23, 7, 8, 9, 24
Offset: 1

Views

Author

Omar E. Pol, Oct 22 2019

Keywords

Comments

For m >= 0, row 2^m consists of just one element (2^m). - Paolo Xausa, May 24 2025

Examples

			Triangle begins:
  [1];
  [2];
  [1, 2], [3];
  [4];
  [2, 3], [5];
  [1, 2, 3], [6];
  [3, 4], [7];
  [8];
  [2, 3, 4], [4, 5], [9];
  [1, 2, 3, 4], [10];
  [5, 6], [11];
  [3, 4, 5], [12];
  [6, 7], [13];
  [2, 3, 4, 5], [14];
  [1, 2, 3, 4, 5], [4, 5, 6], [7, 8], [15];
  [16];
  [8, 9], [17];
  [3, 4, 5, 6], [5, 6, 7], [18];
  [9, 10], [19];
  [2, 3, 4, 5, 6], [20];
  [1, 2, 3, 4, 5, 6], [6, 7, 8], [10, 11], [21];
  [4, 5, 6, 7], [22];
  [11, 12], [23];
  [7, 8, 9], [24];
  [3, 4, 5, 6, 7], [12, 13], [25];
  [5, 6, 7, 8], [26];
  [2, 3, 4, 5, 6, 7], [8, 9, 10], [13, 14], [27];
  [1, 2, 3, 4, 5, 6, 7], [28];
  ...
For n = 9 there are three partitions of 9 into consecutive parts, they are [9], [5, 4], [4, 3, 2], so the 9th row of triangle is [2, 3, 4], [4, 5], [9].
Note that in the below diagram the number of horizontal line segments in the n-th row equals A001227(n), the number of partitions of n into consecutive parts, so we can find the partitions of n into consecutive parts as follows: consider the vertical blocks of numbers that start exactly in the n-th row of the diagram, for example: for n = 15 consider the vertical blocks of numbers that start exactly in the 15th row. They are [1, 2, 3, 4, 5], [4, 5, 6], [7, 8], [15], equaling the 15th row of the above triangle.
Row        _
  1       |1|_
  2       |_ 2|_
  3       |1|  3|_
  4       |2|_   4|_
  5       |_ 2|    5|_
  6       |1|3|_     6|_
  7       |2|  3|      7|_
  8       |3|_ 4|_       8|_
  9       |_ 2|  4|        9|_
  10      |1|3|  5|_        10|_
  11      |2|4|_   5|         11|_
  12      |3|  3|  6|_          12|_
  13      |4|_ 4|    6|           13|_
  14      |_ 2|5|_   7|_            14|_
  15      |1|3|  4|    7|             15|_
  16      |2|4|  5|    8|_              16|_
  17      |3|5|_ 6|_     8|               17|_
  18      |4|  3|  5|    9|_                18|_
  19      |5|_ 4|  6|      9|                 19|_
  20      |_ 2|5|  7|_    10|_                  20|_
  21      |1|3|6|_   6|     10|                   21|_
  22      |2|4|  4|  7|     11|_                    22|_
  23      |3|5|  5|  8|_      11|                     23|_
  24      |4|6|_ 6|    7|     12|_                      24|_
  25      |5|  3|7|_   8|       12|                       25|_
  26      |6|_ 4|  5|  9|_      13|_                        26|_
  27      |_ 2|5|  6|    8|       13|                         27|_
  28      |1|3|6|  7|    9|       14|                           28|
  ...
The diagram is infinite. For more information about the diagram see A286001.
For an amazing connection with sum of divisors function (A000203) see A237593.
		

Crossrefs

Mirror of A299765.
Row n has length A204217(n).
Row sums give A245579.
Column 1 gives A118235.
Right border gives A000027.
Records give A000027.
Where records occur gives A285899.
The number of partitions into consecutive parts in row n is A001227(n).
For tables of partitions into consecutive parts see A286000 and A286001.

Programs

  • Mathematica
    Table[With[{h = Floor[n/2] - Boole[EvenQ@ n]},Append[Array[Which[Total@ # == n, #, Total@ Most@ # == n, Most[#], True, Nothing] &@ NestWhile[Append[#, #[[-1]] + 1] &, {#}, Total@ # <= n &, 1, h - # + 1] &, h], {n}]], {n, 24}] // Flatten (* Michael De Vlieger, Oct 22 2019 *)

A330889 a(n) is the total number of parts in all partitions of n into consecutive parts that differ by 3.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 3, 1, 3, 1, 3, 4, 3, 1, 6, 1, 3, 4, 3, 1, 6, 5, 3, 4, 3, 5, 6, 1, 3, 8, 3, 1, 6, 5, 8, 4, 3, 5, 6, 6, 3, 8, 3, 1, 11, 5, 3, 4, 3, 10, 12, 1, 3, 8, 8, 1, 12, 5, 3, 9, 3, 5, 12, 1, 8, 8, 3, 1, 12, 17, 3, 4, 3, 5, 17, 1, 10, 8, 3, 6, 12, 5, 3, 11, 8, 5, 12, 1, 3, 13
Offset: 1

Views

Author

Omar E. Pol, Apr 30 2020

Keywords

Comments

The one-part partition n = n is included in the count.
For the relation to pentagonal numbers see also A330888.

Examples

			For n = 21 there are three partitions of 21 into consecutive parts that differ by 3, including 21 as a partition. They are [21], [12, 9] and [10, 7, 4]. The number of parts of these partitions are 1, 2 and 3 respectively. The total number of parts is 1 + 2 + 3 = 6, so a(27) = 6.
		

Crossrefs

Row sums of A330888.
Column k=3 of A334466.
Sequences of the same family whose consecutive parts differs by k are: A000203 (k=0), A204217 (k=1), A066839 (k=2), this sequence (k=3), A334464 (k=4), A334732 (k=5), A334949 (k=6).
Cf. A338730.

Programs

  • Maple
    A330889 := proc(n)
        local a;
        a := 0 ;
        for k from 1 do
            if n>= A000325(k) then
                a := a+A330888(n,k);
            else
                return a;
            end if;
        end do:
    end proc: # R. J. Mathar, Oct 02 2020
  • Mathematica
    nmax = 100;
    CoefficientList[Sum[n x^(n(3n-1)/2-1)/(1-x^n), {n, 1, nmax}]+O[x]^nmax, x] (* Jean-François Alcover, Nov 30 2020 *)
    Table[Sum[If[n > 3*k*(k-1)/2 && IntegerQ[n/k - 3*(k-1)/2], k, 0], {k, Divisors[2*n]}], {n, 1, 100}] (* Vaclav Kotesovec, Oct 23 2024 *)
  • PARI
    my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, k*x^(k*(3*k-1)/2)/(1-x^k))) \\ Seiichi Manyama, Dec 04 2020

Formula

Conjecture: G.f.: Sum_{n>=1} n*x^(n*(3*n-1)/2)/(1-x^n).
Proof from Matthew C. Russell, Nov 21 2020:
The summation variable n runs over the number of parts in the partition.
For fixed n, the smallest such partition is:
1 + 4 + 7 + ... + (3n-2).
The above sum is equal to n * (3*n-1) / 2. That's where the x^(n*(3*n-1)/2) factor comes from.
Then we want to (add 1 to every part), (add 2 to every part), etc. to get 2 + 5 + 8 + ..., 3 + 6 + 9 + ..., which corresponds to adding n, 2*n, 3*n, etc. to the base partition. So we divide by (1 - x^n).
Multiply by n (to count the total number of parts) and we are done. QED
Sum_{k=1..n} a(k) ~ (2/3)^(3/2) * n^(3/2). - Vaclav Kotesovec, Oct 23 2024

Extensions

More terms from R. J. Mathar, Oct 02 2020

A285898 Triangle read by row: T(n,k) = number of partitions of n into exactly k consecutive parts (1 <= k <= n).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Omar E. Pol and N. J. A. Sloane, Apr 28 2017

Keywords

Comments

To partition n into k parts, we see if m exists such that m + (m + 1) + ... + (m + k - 1) = k*m + binomial(k, 2) = n exists. a(n) = 1 if and only if (n - binomial(k, 2)) / k is an integer and larger than 0. - David A. Corneth, Apr 28 2017
It appears that this a full version of the irregular triangle A237048. - Omar E. Pol, Apr 28 2017
The value of a(n) can never exceed 1, since that would imply the existence of distinct equal-length ranges of consecutive integers that add up to the same number, which is impossible. - Sidney Cadot, Jan 22 2023

Examples

			Triangle begins:
1;
1, 0;
1, 1, 0;
1, 0, 0, 0;
1, 1, 0, 0, 0;
1, 0, 1, 0, 0, 0;
1, 1, 0, 0, 0, 0, 0;
1, 0, 0, 0, 0, 0, 0, 0;
1, 1, 1, 0, 0, 0, 0, 0, 0;
1, 0, 0, 1, 0, 0, 0, 0, 0, 0;
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0;
1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0;
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
...
For n = 15 there are four partitions of 15 into consecutive parts: [15], [8, 7], [6, 5, 4] and [5, 4, 3, 2, 1]. These partitions are formed by 1, 2, 3 and 5 consecutive parts respectively, so the 15th row of the triangle is [1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0].
		

Crossrefs

Programs

  • Maple
    A285898 := proc(n)
        corn := (n-binomial(k,2))/k ;
        if type(corn,'integer') then
            if corn > 0 then
                1 ;
            else
                0;
            end if;
        else
            0 ;
        end if;
    end proc: # R. J. Mathar, Apr 30 2017
  • Mathematica
    Table[Function[t, Function[s, ReplacePart[s, Map[# -> 1 &, t]]]@ ConstantArray[0, n]]@ Map[Length, Select[IntegerPartitions@ n, Length@ # == 1 || Union@ Differences@ # == {-1} &]], {n, 15}] // Flatten (* Michael De Vlieger, Apr 28 2017 *)
  • PARI
    T(n, k) = n-=binomial(k, 2); if(n>0,n%k==0) \\ David A. Corneth, Apr 28 2017
    
  • Python
    from sympy import binomial
    def T(n, k):
        n=n - binomial(k, 2)
        if n>0:
            return 1 if n%k==0 else 0
        return 0
    for n in range(1, 21): print([T(n, k) for k in range(1, n + 1)]) # Indranil Ghosh, Apr 28 2017

Formula

A000203(n) = Sum_{k=1..n} (-1)^(k-1) * ((Sum_{j=k..n} T(j,k))^2 - (Sum_{j=k..n} T(j-1,k))^2), assuming that T(k-1,k) = 0. - Omar E. Pol, Oct 10 2018

A334949 a(n) is the total number of parts in all partitions of n into consecutive parts that differ by 6.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 4, 3, 1, 6, 1, 3, 4, 3, 1, 6, 1, 3, 4, 3, 1, 6, 1, 3, 4, 7, 1, 6, 1, 7, 4, 3, 1, 10, 1, 3, 4, 7, 1, 6, 1, 7, 4, 3, 1, 10, 1, 3, 4, 7, 6, 6, 1, 7, 4, 8, 1, 10, 1, 3, 9, 7, 1, 6, 1, 12, 4, 3, 1, 10, 6, 3, 4, 7, 1, 11, 1, 7, 4
Offset: 1

Views

Author

Omar E. Pol, May 27 2020

Keywords

Comments

The one-part partition n = n is included in the count.
For the relation to the octagonal numbers see also A334947.

Examples

			For n = 24 there are three partitions of 24 into consecutive parts that differ by 6, including 24 as a valid partition. They are [24], [15, 9] and [14, 8, 2]. There are 1, 2 and 3 parts respectively, hence the total number of parts is 1 + 2 + 3 = 6, so a(24) = 6.
		

Crossrefs

Row sums of A334947.
Column k=6 of A334466.
Sequences of the same family whose consecutive parts differs by k are: A000203 (k=0), A204217 (k=1), A066839 (k=2), A330889 (k=3), A334464 (k=4), A334732 (k=5), this sequence (k=6).

Programs

  • Mathematica
    nmax = 100;
    CoefficientList[Sum[n x^(n(3n-2)-1)/(1-x^n), {n, 1, nmax}]+O[x]^nmax, x] (* Jean-François Alcover, Nov 30 2020 *)
    Table[Sum[If[n > 3*k*(k-1), k, 0], {k, Divisors[n]}], {n, 1, 100}] (* Vaclav Kotesovec, Oct 22 2024 *)
  • PARI
    my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, k*x^(k*(3*k-2))/(1-x^k))) \\ Seiichi Manyama, Dec 04 2020

Formula

G.f.: Sum_{n>=1} n*x^(n*(3*n-2))/(1-x^n). (For proof, see A330889. - Omar E. Pol, Nov 22 2020)
Sum_{k=1..n} a(k) ~ 2 * n^(3/2) / 3^(3/2). - Vaclav Kotesovec, Oct 23 2024
Showing 1-10 of 38 results. Next