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

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

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

A244051 Triangle read by rows in which row n lists the parts of the partitions of n into equal parts, in nonincreasing order.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Nov 08 2014

Keywords

Comments

Row n has length sigma(n) = A000203(n).
Row sums give n*A000005(n) = A038040(n).
Column 1 is A000027.
Both columns 2 and 3 are A032742, n > 1.
For any k > 0 and t > 0, the sequence contains exactly one run of k consecutive t's. - Rémy Sigrist, Feb 11 2019
From Omar E. Pol, Dec 04 2019: (Start)
The number of parts congruent to 0 (mod m) in row m*n equals sigma(n) = A000203(n).
The number of parts greater than 1 in row n equals A001065(n), the sum of aliquot parts of n.
The number of parts greater than 1 and less than n in row n equals A048050(n), the sum of divisors of n except for 1 and n.
The number of partitions in row n equals A000005(n), the number of divisors of n.
The number of partitions in row n with an odd number of parts equals A001227(n).
The sum of odd parts in row n equals the sum of parts of the partitions in row n that have an odd number of parts, and equals the sum of all parts in the partitions of n into consecutive parts, and equals A245579(n) = n*A001227(n).
The decreasing records in row n give the n-th row of A056538.
Row n has n 1's which are all at the end of the row.
First n rows contain A000217(n) 1's.
The number of k's in row n is A126988(n,k).
The number of odd parts in row n is A002131(n).
The k-th block in row n has A027750(n,k) parts.
Right border gives A000012. (End)
The r-th row of the triangle begins at index k = A160664(r-1). - Samuel Harkness, Jun 21 2022

Examples

			Triangle begins:
   [1];
   [2], [1,1];
   [3], [1,1,1];
   [4], [2,2], [1,1,1,1];
   [5], [1,1,1,1,1];
   [6], [3,3], [2,2,2], [1,1,1,1,1,1];
   [7], [1,1,1,1,1,1,1];
   [8], [4,4], [2,2,2,2], [1,1,1,1,1,1,1,1];
   [9], [3,3,3], [1,1,1,1,1,1,1,1,1];
  [10], [5,5], [2,2,2,2,2], [1,1,1,1,1,1,1,1,1,1];
  [11], [1,1,1,1,1,1,1,1,1,1,1];
  [12], [6,6], [4,4,4], [3,3,3,3], [2,2,2,2,2,2], [1,1,1,1,1,1,1,1,1,1,1,1];
  [13], [1,1,1,1,1,1,1,1,1,1,1,1,1];
  [14], [7,7], [2,2,2,2,2,2,2], [1,1,1,1,1,1,1,1,1,1,1,1,1,1];
  [15], [5,5,5], [3,3,3,3,3], [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
  [16], [8,8], [4,4,4,4], [2,2,2,2,2,2,2,2], [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
  ...
For n = 6 the 11 partitions of 6 are [6], [3, 3], [4, 2], [2, 2, 2], [5, 1], [3, 2], [4, 1, 1], [2, 2, 1, 1], [3, 1, 1, 1], [2, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]. There are only four partitions of 6 that contain equal parts so the 6th row of triangle is [6], [3, 3], [2, 2, 2], [1, 1, 1, 1, 1, 1]. The number of parts equals sigma(6) = A000203(6) = 12. The row sum is A038040(6) = 6*A000005(6) = 6*4 = 24.
From _Omar E. Pol_, Dec 04 2019: (Start)
The structure of the above triangle is as follows:
   1;
   2 11;
   3    111;
   4 22     1111;
   5             11111;
   6 33 222            111111;
   7                          1111111;
   8 44     2222                      11111111;
   9    333                                    111111111;
  ... (End)
		

Crossrefs

Programs

  • Mathematica
    A244051row[n_]:=Flatten[Map[ConstantArray[#,n/#]&,Reverse[Divisors[n]]]];
    Array[A244051row,10] (* Paolo Xausa, Oct 16 2023 *)
  • PARI
    tabf(nn) = {for (n=1, nn, d = Vecrev(divisors(n)); for (i=1, #d, for (j=1, n/d[i], print1(d[i], ", "));); print(););} \\ Michel Marcus, Nov 08 2014

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 *)

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

A285891 Triangle read by rows: T(n,k) = n*A237048(n,k).

Original entry on oeis.org

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

Views

Author

Omar E. Pol, May 02 2017

Keywords

Comments

Conjecture: T(n,k) = n, is also the sum of the parts of the partition of n into k consecutive parts, if such a partition exists, otherwise T(n,k) = 0.

Examples

			Triangle begins:
1;
2;
3,   3;
4,   0;
5,   5;
6,   0,  6;
7,   7,  0;
8,   0,  0;
9,   9,  9;
10,  0,  0, 10;
11, 11,  0,  0;
12,  0, 12,  0;
13, 13,  0,  0;
14,  0,  0, 14;
15, 15, 15,  0, 15;
16,  0,  0,  0,  0;
17, 17,  0,  0,  0;
18,  0, 18, 18,  0;
19, 19,  0,  0,  0;
20,  0,  0,  0, 20;
21, 21, 21,  0,  0, 21;
22,  0,  0, 22,  0,  0;
23, 23,  0,  0,  0,  0;
24,  0, 24,  0,  0,  0;
25, 25,  0,  0, 25,  0;
26,  0,  0, 26,  0,  0;
27, 27, 27,  0,  0, 27;
28,  0,  0,  0,  0,  0, 28;
...
		

Crossrefs

Row sums give A245579.
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.

Programs

  • 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(n*t(n, k), ", "); ); print(); ); } \\ Michel Marcus, Nov 04 2019

A285900 Sum of all parts of all partitions of all positive integers <= n into consecutive parts.

Original entry on oeis.org

1, 3, 9, 13, 23, 35, 49, 57, 84, 104, 126, 150, 176, 204, 264, 280, 314, 368, 406, 446, 530, 574, 620, 668, 743, 795, 903, 959, 1017, 1137, 1199, 1231, 1363, 1431, 1571, 1679, 1753, 1829, 1985, 2065, 2147, 2315, 2401, 2489, 2759, 2851, 2945, 3041, 3188, 3338, 3542, 3646, 3752, 3968, 4188, 4300, 4528, 4644, 4762, 5002
Offset: 1

Views

Author

Omar E. Pol, May 02 2017

Keywords

Comments

a(n) is also the sum of all parts of all partitions of all positive integers <= n into an odd number of equal parts. - Omar E. Pol, Jun 05 2017

Examples

			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 sum of all parts of these four partitions is 60, and a(14) = 204, so a(15) = 204 + 60 = 264.
		

Crossrefs

Partial sums of A245579.

Programs

  • Mathematica
    a285900[n_] := Accumulate[Map[# DivisorSum[#, 1 &, OddQ] &, Range[n]]]
    a285900[60] (* data *) (* Hartmut F. W. Hoft, Jun 06 2017 *)
  • PARI
    a(n)=sum(i=1, n, i * sumdiv(i, d, d%2)); \\ Andrew Howroyd, Nov 06 2018
    
  • PARI
    a(n)=sum(k=1, (n+1)\2, (2*k - 1)/2 * (n\(2*k - 1)) * (1 + n\(2*k - 1))); \\ Andrew Howroyd, Nov 06 2018

Formula

a(n) = Sum_{k=1..floor((n+1)/2)} (2*k-1)/2 * floor(n/(2*k-1)) * floor(1 + n/(2*k-1)). - Daniel Suteu, Nov 06 2018

A328361 Triangle read by rows: T(n,k) is the total number of k's in all partitions of n into consecutive parts, (1 <= k <= n).

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Oct 20 2019

Keywords

Comments

Iff n is a power of 2 (A000079) then row n lists n - 1 zeros together with 1.
Iff n is an odd prime (A065091) then row n lists (n - 3)/2 zeros, 1, 1, (n - 3)/2 zeros, 1.

Examples

			Triangle begins:
1;
0, 1;
1, 1, 1;
0, 0, 0, 1;
0, 1, 1, 0, 1;
1, 1, 1, 0, 0, 1;
0, 0, 1, 1, 0, 0, 1;
0, 0, 0, 0, 0, 0, 0, 1;
0, 1, 1, 2, 1, 0, 0, 0, 1;
1, 1, 1, 1, 0, 0, 0, 0, 0, 1;
0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1;
0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1;
0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1;
0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1;
1, 1, 1, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
...
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 [0, 1, 1, 2, 1, 0, 0, 0, 1].
		

Crossrefs

Row sums give A204217.
Column 1 gives A010054, n >= 1.
Leading diagonal gives A000012.

A334466 Square array read by antidiagonals upwards: T(n,k) is the total number of parts in all partitions of n into consecutive parts that differ by k, with n >= 1, k >= 0.

Original entry on oeis.org

1, 3, 1, 4, 1, 1, 7, 3, 1, 1, 6, 1, 1, 1, 1, 12, 3, 3, 1, 1, 1, 8, 4, 1, 1, 1, 1, 1, 15, 3, 3, 3, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1, 18, 6, 3, 3, 3, 1, 1, 1, 1, 1, 12, 5, 4, 1, 1, 1, 1, 1, 1, 1, 1, 28, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 14, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 24, 3, 6, 3, 3, 3, 3, 1
Offset: 1

Views

Author

Omar E. Pol, May 01 2020

Keywords

Comments

The one-part partition n = n is included in the count.
The column k is related to (k+2)-gonal numbers, assuming that 2-gonals are the nonnegative numbers, 3-gonals are the triangular numbers, 4-gonals are the squares, 5-gonals are the pentagonal numbers, and so on.
Note that the number of parts for T(n,0) = A000203(n), equaling the sum of the divisors of n.
For fixed k>0, Sum_{j=1..n} T(j,k) ~ 2^(3/2) * n^(3/2) / (3*sqrt(k)). - Vaclav Kotesovec, Oct 23 2024

Examples

			Square array starts:
   n\k|   0  1  2  3  4  5  6  7  8  9 10 11 12
   ---+---------------------------------------------
   1  |   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
   2  |   3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
   3  |   4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
   4  |   7, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
   5  |   6, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
   6  |  12, 4, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, ...
   7  |   8, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, ...
   8  |  15, 1, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, ...
   9  |  13, 6, 4, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, ...
  10  |  18, 5. 3. 1. 3. 1, 3, 1, 3, 1, 1, 1, 1, ...
  11  |  12, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, 1, ...
  12  |  28, 4, 6, 4, 3, 1, 3, 1, 3, 1, 3, 1, 1, ...
  ...
For n = 9 we have that:
For k = 0 the partitions of 9 into consecutive parts that differ by 0 (or simply: the partitions of 9 into equal parts) are [9], [3,3,3], [1,1,1,1,1,1,1,1,1]. In total there are 13 parts, so T(9,0) = 13.
For k = 1 the partitions of 9 into consecutive parts that differ by 1 (or simply: the partitions of 9 into consecutive parts) are [9], [5,4], [4,3,2]. In total there are six parts, so T(9,1) = 6.
For k = 2 the partitions of 9 into consecutive parts that differ by 2 are [9], [5, 3, 1]. In total there are four parts, so T(9,2) = 4.
		

Crossrefs

Columns k: A000203 (k=0), A204217 (k=1), A066839 (k=2), A330889 (k=3), A334464 (k=4), A334732 (k=5), A334949 (k=6), A377300 (k=7), A377301 (k=8).
Triangles whose row sums give the column k: A127093 (k=0), A285914 (k=1), A330466 (k=2) (conjectured), A330888 (k=3), A334462 (k=4), A334540 (k=5), A339947 (k=6).
Sequences of number of partitions related to column k: A000005 (k=0), A001227 (k=1), A038548 (k=2), A117277 (k=3), A334461 (k=4), A334541 (k=5), A334948 (k=6).
Tables of partitions related to column k: A010766 (k=0), A286001 (k=1), A332266 (k=2), A334945 (k=3), A334618 (k=4).
Polygonal numbers related to column k: A001477 (k=0), A000217 (k=1), A000290 (k=2), A000326 (k=3), A000384 (k=4), A000566 (k=5), A000567 (k=6).

Programs

  • Mathematica
    nmax = 14;
    col[k_] := col[k] = CoefficientList[Sum[n x^(n(k n - k + 2)/2)/(1 - x^n), {n, 1, nmax}] + O[x]^(nmax+1), x];
    T[n_, k_] := col[k][[n+1]];
    Table[T[n-k, k], {n, 1, nmax}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, Nov 30 2020 *)

Formula

The g.f. for column k is Sum_{n>=1} n*x^(n*(k*n-k+2)/2)/(1-x^n). (For proof, see A330889. - N. J. A. Sloane, Nov 21 2020)

A327262 a(n) is the sum of all parts of all partitions of n into consecutive parts that differ by 4.

Original entry on oeis.org

1, 2, 3, 4, 5, 12, 7, 16, 9, 20, 11, 24, 13, 28, 30, 32, 17, 54, 19, 40, 42, 44, 23, 72, 25, 52, 54, 84, 29, 90, 31, 96, 66, 68, 35, 144, 37, 76, 78, 120, 41, 126, 43, 132, 135, 92, 47, 192, 49, 150, 102, 156, 53, 162, 110, 168, 114, 116, 59, 300, 61, 124, 126, 192, 130, 264, 67, 204, 138, 210
Offset: 1

Views

Author

Omar E. Pol, Apr 30 2020

Keywords

Comments

The one-part partition n = n is included in the count.

Examples

			For n = 28 there are three partitions of 28 into consecutive parts that differ by 4, including 28 as a valid partition. They are [28], [16, 12] and [13, 9, 5, 1]. The sum of the parts is [28] + [16 + 12] + [13 + 9 + 5 + 1] = 84, so a(28) = 84.
		

Crossrefs

Sequences of the same family where the parts differs by k are: A038040 (k=0), A245579 (k=1), A060872 (k=2), A334463 (k=3), this sequence (k=4), A334733 (k=5).

Programs

  • Mathematica
    pn4[n_]:=Total[Flatten[Select[IntegerPartitions[n],Union[Abs[Differences[#]]]=={4}&]]]+n; Array[pn4,70] (* Harvey P. Dale, Nov 26 2023 *)

Formula

a(n) = n*A334461(n).
Showing 1-10 of 29 results. Next