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 35 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).

A204217 G.f.: Sum_{n>=1} n * x^(n*(n+1)/2) / (1 - x^n).

Original entry on oeis.org

1, 1, 3, 1, 3, 4, 3, 1, 6, 5, 3, 4, 3, 5, 11, 1, 3, 8, 3, 6, 12, 5, 3, 4, 8, 5, 12, 8, 3, 13, 3, 1, 12, 5, 15, 12, 3, 5, 12, 6, 3, 15, 3, 9, 26, 5, 3, 4, 10, 10, 12, 9, 3, 17, 18, 8, 12, 5, 3, 17, 3, 5, 28, 1, 18, 19, 3, 9, 12, 17, 3, 13, 3, 5, 27, 9, 21, 20, 3, 6, 21, 5, 3, 19, 18, 5, 12, 12, 3
Offset: 1

Views

Author

Paul D. Hanna, Jan 12 2012

Keywords

Comments

Conjecture: a(n) is the total number of parts in all partitions of n into consecutive parts. - Omar E. Pol, Apr 23 2017
Conjecture: row sums of A285914. - Omar E. Pol, Apr 30 2017
(The conjectures are true. See Joerg Arndt's proof in the Links section.) - Omar E. Pol, Jun 14 2017
Row lengths of A299765. - Omar E. Pol, Jul 23 2018
From Omar E. Pol, Oct 20 2019: (Start)
Row sums of A328361.
a(n) = 3 iff n is an odd prime. (End)

Examples

			G.f.: A(x) = x + x^2 + 3*x^3 + x^4 + 3*x^5 + 4*x^6 + 3*x^7 + x^8 + ...
follows by expanding A(x) = x/(1-x) + 2*x^3/(1-x^2) + 3*x^6/(1-x^3) + 4*x^10/(1-x^4) + ...
Also, by a Ramanujan identity:
A(x)*Theta4(x)^2 = x*(1-x)/(1+x)^2 - 2*x^3*(1-x^2)/(1+x^2)^2 + 3*x^6*(1-x^3)/(1+x^3)^2 - 4*x^10*(1-x^4)/(1+x^4)^2 + 5*x^15*(1-x^5)/(1+x^5)^2 + ...
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 total number of parts is 11, so a(15) = 11. - _Omar E. Pol_, Apr 23 2017
From _Omar E. Pol_, Nov 30 2020: (Start)
Illustration of initial terms:
                         Diagram
n   a(n)                       _
1     1                      _|1
2     1                    _|1 _
3     3                  _|1  |2
4     1                _|1   _|
5     3              _|1    |2 _
6     4            _|1     _| |3
7     3          _|1      |2  |
8     1        _|1       _|  _|
9     6      _|1        |2  |3 _
10    5     |1          |   | |4
...
a(n) is the total length of all vertical line segments that are below and that share one vertex with the horizontal line segments that are in the n-th level of the diagram. For more information about the diagram see A286001 and A237593. (End)
		

Crossrefs

Programs

  • Mathematica
    terms = 1024; Sum[n*x^(n*(n+1)/2)/(1-x^n), {n, 1, Ceiling[Sqrt[2*terms]]}] + O[x]^(terms+1) // CoefficientList[#, x]& // Rest (* Jean-François Alcover, Jun 04 2017 *)
    Table[Sum[If[n > k*(k-1)/2 && IntegerQ[n/k - (k-1)/2], k, 0], {k, Divisors[2*n]}], {n, 1, 100}] (* Vaclav Kotesovec, Oct 23 2024 *)
  • PARI
    {a(n)=polcoeff(sum(m=1,n,m*x^(m*(m+1)/2)/(1-x^m+x*O(x^n))),n)}
    
  • PARI
    {a(n)=local(Theta4=1+2*sum(m=1,sqrtint(n+1),(-x)^(m^2))+x*O(x^n));polcoeff(1/Theta4^2*sum(m=1,sqrtint(2*n+1),(-1)^(m-1)*m*x^(m*(m+1)/2)*(1-x^m)/(1+x^m+x*O(x^n))^2),n)}
    
  • PARI
    a(n) = {nb = 0; forpart(v=n, nbp = #v; if ((#Set(v)==#v) && (v[nbp] - v[1] == #v-1), nb += #v); ); nb; } \\ Michel Marcus, Apr 23 2017
    
  • PARI
    a(n) = {my(i=2, t=1); n--; while(n>0, t += (i*(n%i==0)); n-=i; i++); t} \\ David A. Corneth, Apr 28 2017

Formula

a(k) = 1 iff k = 2^n for n>=0.
G.f.: (1/Theta4(x)^2) * Sum_{n>=1} (-1)^(n-1)* n*x^(n*(n+1)/2) * (1 - x^n)/(1 + x^n)^2 where Theta4(x) = 1 + 2*Sum_{n>=1} (-x)^(n^2), due to an identity of Ramanujan.
Conjecture: a(n) = Sum_{k=1..n} k*A285898(n,k). - R. J. Mathar, Apr 30 2017
Conjecture: a(n) = Sum_{k=1..A003056(n)} k*A237048(n,k). - Omar E. Pol, Apr 30 2017
(The conjectures are true. See Joerg Arndt's proof in the Links section.) - Omar E. Pol, Jun 14 2017
Sum_{k=1..n} a(k) ~ 2^(3/2) * n^(3/2) / 3. - Vaclav Kotesovec, Oct 23 2024

A245579 Number of odd divisors of n multiplied by n.

Original entry on oeis.org

1, 2, 6, 4, 10, 12, 14, 8, 27, 20, 22, 24, 26, 28, 60, 16, 34, 54, 38, 40, 84, 44, 46, 48, 75, 52, 108, 56, 58, 120, 62, 32, 132, 68, 140, 108, 74, 76, 156, 80, 82, 168, 86, 88, 270, 92, 94, 96, 147, 150, 204, 104, 106, 216, 220, 112, 228, 116, 118, 240, 122
Offset: 1

Views

Author

Michael Somos, Jul 26 2014

Keywords

Examples

			G.f. = x + 2*x^2 + 6*x^3 + 4*x^4 + 10*x^5 + 12*x^6 + 14*x^7 + 8*x^8 + ...
For n = 10 there are two odd divisors of 10: 1 and 5, so a(10) = 2*10 = 20.
		

Crossrefs

Programs

  • Maple
    seq(n*numtheory:-tau(n/2^padic:-ordp(n,2)), n=1..100); # Robert Israel, Apr 26 2017
  • Mathematica
    a[ n_] := If[ n < 1, 0, n Sum[ Mod[d, 2], {d, Divisors @ n}]];
    (* Second program: *)
    Table[n DivisorSum[n, 1 &, OddQ], {n, 61}] (* Michael De Vlieger, Apr 24 2017 *)
  • PARI
    {a(n) = if( n<1, 0, n * sumdiv(n, d, d%2))};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum(k=1, n, if( k%2, k * x^k / (1 - x^k)^2), x * O(x^n)), n))};
    
  • PARI
    {a(n) = if( n<1, 0, n * numdiv(n / 2^valuation(n, 2)))} \\ Fast when n has many divisors. Jens Kruse Andersen, Jul 26 2014
    
  • Python
    from sympy import divisors
    def a(n): return n*len(list(filter(lambda i: i%2==1, divisors(n)))) # Indranil Ghosh, Apr 24 2017
    
  • Python
    from math import prod
    from sympy import factorint
    def A245579(n): return n*prod(e+1 for e in factorint(n>>(~n&n-1).bit_length()).values()) # Chai Wah Wu, Dec 31 2023

Formula

a(n) is multiplicative with a(2^e) = 2^e, a(p^e) = p^e * (e+1) if p>2.
a(n) = n * A001227(n).
G.f.: Sum_{k>0 odd} k * x^k / (1 - x^k)^2.
From Amiram Eldar, Dec 31 2022: (Start)
Dirichlet g.f.: zeta(s-1)^2*(1-1/2^(s-1)).
Sum_{k=1..n} a(k) ~ n^2*log(n)/4 + (4*gamma + 2*log(2) - 1)*n^2/8, where gamma is Euler's constant (A001620). (End)

Extensions

Edited by N. J. A. Sloane, Apr 27 2022

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

A341971 Irregular triangle read by rows in which row n lists the values in row n of A235791 whose indices are in row n of A341970; a number is signed when its index is even.

Original entry on oeis.org

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

Views

Author

Hartmut F. W. Hoft, Feb 24 2021

Keywords

Comments

Row n has length A001227(n), the number of odd divisors of n, and also the number of entries in row n of A341970.
Let 1 <= n, 1 <= d <= A001227(n) and k = A341970(A060831(n-1) + d). Expression s(n, k) = r*n - r*(r+1)*(r+2)/6 + k with r = floor((sqrt(8*n + 1) - 1)/2) translates position (row n, column k) in the triangle of A235791 to its position in sequence A235791.
The absolute values in row n are the smallest parts of the partitions of n into consecutive parts (with the partitions ordered by increasing number of parts). - Omar E. Pol, Dec 31 2024

Examples

			Triangle begins:
   1
   2
   3  -1
   4
   5  -2
   6   1
   7  -3
   8
   9  -4   2
  10  -1
  11  -5
  12   3
  13  -6
  14  -2
  15  -7   4   1
  16
  17  -8
  18   5  -3
  19  -9
  20   2
  21 -10   6  -1
...
a(26)..a(29) = { 15, -7, 4, 1 } is row 15 in this sequence with corresponding row 15 { 1, 1, 1, 0, 1 } in A237048. The sum 15 - 7 = 8 represents the first (complete) part of the symmetric representation of sigma(15), while 4 gives to incomplete bottom subpart of the central part and 1 the complete subpart of the second layer on the diagonal of the central part. Because of the double counting on the diagonal the completed subparts of the symmetric central part have size 7 and 1 respectively, see A280851, so that the parts of the symmetric representation of sigma(15) are (8, 8, 8).
a(40)..a(43) = { 21, -10, 6, -1 } is row 21 in this sequence with corresponding row 21 { 1, 1, 1, 0, 0, 1 } in A237048. The sums 21 - 10 = 11 and 6 - 1 = 5 denote the sizes of the two (complete) parts of width 1 of the symmetric representation of sigma(21) up to the diagonal resulting in the four parts ( 11, 5, 5, 11 ).
		

Crossrefs

Programs

  • Mathematica
    (* Function a341970[ ] is defined in A341970 *)
    widthL[n_] := Rest[FoldList[#1+If[OddQ[#2], +1, -1]&, 0, a341970[n]]]
    sT[n_] := Map[(-1)^(#+1) Ceiling[(n+1)/# - (#+1)/2]&, a341970[n]]
    a341971[n_] := Flatten[Map[sT, Range[n]]]
    a341971[31] (* first 31 rows of table *)

Formula

a(A060831(n-1) + d) = T(n,d) = (-1)^(k+1)*A235791(s(n, k)).

A118235 Smallest positive number starting an interval of consecutive integers with element sum n.

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 3, 8, 2, 1, 5, 3, 6, 2, 1, 16, 8, 3, 9, 2, 1, 4, 11, 7, 3, 5, 2, 1, 14, 4, 15, 32, 3, 7, 2, 1, 18, 8, 4, 6, 20, 3, 21, 2, 1, 10, 23, 15, 4, 8, 6, 3, 26, 2, 1, 5, 7, 13, 29, 4, 30, 14, 3, 64, 2, 1, 33, 5, 9, 7, 35, 4, 36, 17, 3, 6, 2, 1, 39, 14, 5, 19, 41, 7, 4, 20, 12, 3, 44, 2, 1, 8
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 18 2006

Keywords

Comments

Right border of A299765. - Omar E. Pol, Jul 24 2018
In other words: a(n) is smallest part of the partitions of n into consecutive parts. - Omar E. Pol, Mar 12 2019

Examples

			a(3)=1 since 3 = 1+2; a(5)=2 since 5 = 2+3; a(6)=1 since 6 = 1+2+3; etc.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local j, k, s; j, k, s:= 1$3;
          while s<>n do
             if sAlois P. Heinz, Aug 05 2018
  • Mathematica
    a[n_] := Module[{j = 1, k = 1, s = 1}, While[True, If[s == n, Break[]]; If[s < n, k = k+1; s = s+k, s = s-j; j = j+1]]; j];
    Array[a, 100] (* Jean-François Alcover, Mar 12 2019, after Alois P. Heinz *)
  • PARI
    {a(n)=local(A=n);for(j=1,n,for(k=j,n+1,if(n==k*(k-1)/2-j*(j-1)/2,A=j;k=j=2*n+1)));A} /* Paul D. Hanna, Oct 28 2011 */

Formula

A109814(n) * (A109814(n) + 2*a(n) - 1) / 2 = n.
a(m) = n iff m = 2^k: a(A000079(n)) = A000079(n);
a(m) = 1 iff m = k*(k+1)/2: a(A000217(n)) = 1.
a(A002817(n-1)+1) = n; i.e., a(m) = n if m = k*(k-1)/2 + 1 and k = n*(n-1)/2 + 1. - Paul D. Hanna, Oct 28 2011
a(m) = 2 iff m = k*(k+3)/2: a(A000096(n)) = 2. - Bernard Schott, Mar 12 2019

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

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.

A285899 Total number of parts in all partitions of all positive integers <= n into consecutive parts.

Original entry on oeis.org

1, 2, 5, 6, 9, 13, 16, 17, 23, 28, 31, 35, 38, 43, 54, 55, 58, 66, 69, 75, 87, 92, 95, 99, 107, 112, 124, 132, 135, 148, 151, 152, 164, 169, 184, 196, 199, 204, 216, 222, 225, 240, 243, 252, 278, 283, 286, 290, 300, 310, 322, 331, 334, 351, 369, 377, 389, 394, 397, 414, 417, 422, 450, 451, 469, 488, 491, 500, 512, 529
Offset: 1

Views

Author

Omar E. Pol, May 02 2017

Keywords

Comments

Partial sums of A204217.
Sum of first n rows of the triangle A285914.
Where records occur in A328365. - Omar E. Pol, Oct 22 2019
Row sums of A328368. - Omar E. Pol, Nov 04 2019

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 total number of parts in these four partitions is 11, and a(14) = 43, so a(15) = 43 + 11 = 54.
		

Crossrefs

Showing 1-10 of 35 results. Next