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-7 of 7 results.

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

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.

A328362 Triangle read by rows: T(n,k) is the sum of all parts k in all partitions of n into consecutive parts, (1 <= k <= n).

Original entry on oeis.org

1, 0, 2, 1, 2, 3, 0, 0, 0, 4, 0, 2, 3, 0, 5, 1, 2, 3, 0, 0, 6, 0, 0, 3, 4, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 8, 0, 2, 3, 8, 5, 0, 0, 0, 9, 1, 2, 3, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 5, 6, 0, 0, 0, 0, 11, 0, 0, 3, 4, 5, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 13, 0, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 14
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 n.
Iff n is an odd prime (A065091) then row n lists (n - 3)/2 zeros, (n - 1)/2, (n + 1)/2, (n - 3)/2 zeros, n.

Examples

			Triangle begins:
1;
0, 2;
1, 2, 3;
0, 0, 0, 4;
0, 2, 3, 0, 5;
1, 2, 3, 0, 0, 6;
0, 0, 3, 4, 0, 0, 7;
0, 0, 0, 0, 0, 0, 0, 8;
0, 2, 3, 8, 5, 0, 0, 0, 9;
1, 2, 3, 4, 0, 0, 0, 0, 0, 10;
0, 0, 0, 0, 5, 6, 0, 0, 0,  0, 11;
0, 0, 3, 4, 5, 0, 0, 0, 0,  0,  0, 12;
0, 0, 0, 0, 0, 6, 7, 0, 0,  0,  0,  0, 13;
0, 2, 3, 4, 5, 0, 0, 0, 0,  0,  0,  0,  0, 14;
1, 2, 3, 8,10, 6, 7, 8, 0,  0,  0,  0,  0,  0, 15;
0, 0, 0, 0, 0, 0, 0, 0, 0,  0,  0,  0,  0,  0,  0, 16;
...
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, 2, 3, 8, 5, 0, 0, 0, 9].
		

Crossrefs

Row sums give A245579.
Column 1 gives A010054, n => 1.
Leading diagonal gives A000027.

Formula

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

A328368 Irregular triangle read by rows: T(n,k) is the total number of parts in all partitions of all positive integers <= n into k consecutive parts.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Nov 02 2019

Keywords

Comments

Column k lists k times every nonzero multiple of k in nondecreasing order.
Column k lists the partial sums of the k-th column of triangle A285914.

Examples

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

Crossrefs

Row sums give A285899.
Row n has length A003056(n).
Column 1 gives A000027.
Column k starts with k in the row A000217(k).

Programs

  • PARI
    tt(n, k) = k*(if (k % 2, (n % k) == 0, ((n - k/2) % k) == 0)); \\ A285891
    t(n, k) = sum(j=k*(k+1)/2, n, tt(j, k));
    tabf(nn) = {for (n=1, nn, for (k=1, floor((sqrt(1+8*n)-1)/2), print1(t(n, k), ", "); ); print(); ); } \\ Michel Marcus, Nov 04 2019

A328371 Irregular triangle read by rows: T(n,k) is the sum of all parts of all partitions of all positive integers <= n into k consecutive parts.

Original entry on oeis.org

1, 3, 6, 3, 10, 3, 15, 8, 21, 8, 6, 28, 15, 6, 36, 15, 6, 45, 24, 15, 55, 24, 15, 10, 66, 35, 15, 10, 78, 35, 27, 10, 91, 48, 27, 10, 105, 48, 27, 24, 120, 63, 42, 24, 15, 136, 63, 42, 24, 15, 153, 80, 42, 24, 15, 171, 80, 60, 42, 15, 190, 99, 60, 42, 15, 210, 99, 60, 42, 35, 231, 120, 81, 42, 35, 21
Offset: 1

Views

Author

Omar E. Pol, Nov 02 2019

Keywords

Comments

Column k lists the partial sums of the k-th column of triangle A285891.

Examples

			Triangle begins:
    1;
    3;
    6,   3;
   10,   3;
   15,   8;
   21,   8,   6;
   28,  15,   6;
   36,  15,   6;
   45,  24,  15;
   55,  24,  15, 10;
   66,  35,  15, 10;
   78,  35,  27, 10;
   91,  48,  27, 10;
  105,  48,  27, 24,
  120,  63,  42, 24, 15;
  136,  63,  42, 24, 15;
  153,  80,  42, 24, 15;
  171,  80,  60, 42, 15;
  190,  99,  60, 42, 15;
  210,  99,  60, 42, 35;
  231, 120,  81, 42, 35, 21;
  253, 120,  81, 64, 35, 21;
  276, 143,  81, 64, 35, 21;
  300, 143, 105, 64, 35, 21;
  325, 168, 105, 64, 60, 21;
  351, 168, 105, 90, 60, 21;
  378, 195, 132, 90, 60, 48;
  406, 195, 132, 90, 60, 48, 28;
...
		

Crossrefs

Row sums give A285900.
Row n has length A003056(n).
Column 1 gives the nonzero terms of A000217.
Column k starts with A000217(k) in the row A000217(k).

Programs

  • PARI
    tt(n, k) = n*(if (k % 2, (n % k) == 0, ((n - k/2) % k) == 0)); \\ A285891
    t(n, k) = sum(j=k*(k+1)/2, n, tt(j, k));
    tabf(nn) = {for (n=1, nn, for (k=1, floor((sqrt(1+8*n)-1)/2), print1(t(n, k), ", "); ); print(); ); } \\ Michel Marcus, Nov 04 2019

A319895 a(n) is the number of partitions of n into consecutive parts, plus the total number of parts in those partitions.

Original entry on oeis.org

2, 2, 5, 2, 5, 6, 5, 2, 9, 7, 5, 6, 5, 7, 15, 2, 5, 11, 5, 8, 16, 7, 5, 6, 11, 7, 16, 10, 5, 17, 5, 2, 16, 7, 19, 15, 5, 7, 16, 8, 5, 19, 5, 11, 32, 7, 5, 6, 13, 13, 16, 11, 5, 21, 22, 10, 16, 7, 5, 21, 5, 7, 34, 2, 22, 23, 5, 11, 16, 21, 5, 16, 5, 7, 33, 11, 25, 24, 5, 8, 26, 7, 5, 23, 22, 7, 16, 14, 5
Offset: 1

Views

Author

Omar E. Pol, Sep 30 2018

Keywords

Comments

a(n) is also the total length of all pairs of orthogonal line segments whose horizontal and upper parts are in the n-th row of the diagram associated to partitions into consecutive parts as shown in the Example section.
a(n) = 2 iff n is a power of 2.
a(n) = 5 iff n is an odd prime.

Examples

			Illustration of a diagram of 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
...
For n = 21 we have that there are four partitions of 21 into consecutive parts, they are [21], [11, 10], [8, 7, 6], [6, 5, 4, 3, 2, 1]. The total number of parts is 1 + 2 + 3 + 6 = 12. Therefore the number of partitions plus the total number of parts is 4 + 12 = 16, so a(21) = 16.
On the other hand, in the above diagram there are four pairs of orthogonal line segments whose horizontal upper part are located on the 21st row, as shown below:
.                   _                     _       _         _
.                  |21                   |11     |8        |6
.                                        |10     |7        |5
.                                                |6        |4
.                                                          |3
.                                                          |2
.                                                          |1
.
The four horizontal line segments have length 1, and the vertical line segments have lengths 1, 2, 3, 6 respectively. Therefore the total length of the line segments is 1 + 1 + 1 + 1 + 1 + 2 + 3 + 6 = 16, so a(21) = 16.
		

Crossrefs

For tables of partitions into consecutive parts see A286000 and A286001.

Programs

Formula

a(n) = A001227(n) + A204217(n).

Extensions

Term a(87) corrected from 6 to 16 by Antti Karttunen, Dec 06 2021
Showing 1-7 of 7 results.