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

A080577 Triangle in which n-th row lists all partitions of n, in graded reverse lexicographic ordering.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Mar 23 2003

Keywords

Comments

This is the "Mathematica" ordering of the partitions, referenced in numerous other sequences. The partitions of each integer are in reverse order of the conjugates of the partitions in Abramowitz and Stegun order (A036036). They are in the reverse of the order of the partitions in Maple order (A080576). - Franklin T. Adams-Watters, Oct 18 2006
The graded reverse lexicographic ordering of the partitions is often referred to as the "Canonical" ordering of the partitions. - Daniel Forgues, Jan 21 2011
Also the "MAGMA" ordering of the partitions. - Jason Kimberley, Oct 28 2011
Also an intuitive ordering described but not formalized in [Hardy and Wright] the first four editions of which precede [Abramowitz and Stegun]. - L. Edson Jeffery, Aug 03 2013
Also the "Sage" ordering of the partitions. - Peter Luschny, Aug 12 2013
While this is the order used for the constructive function "IntegerPartitions", it is different from Mathematica's canonical ordering of finite expressions, the latter giving A036036 if parts of partitions are read in reversed (weakly increasing) order, or A334301 if in the usual (weakly decreasing) order. - Gus Wiseman, May 08 2020

Examples

			First five rows are:
  {{1}}
  {{2}, {1, 1}}
  {{3}, {2, 1}, {1, 1, 1}}
  {{4}, {3, 1}, {2, 2}, {2, 1, 1}, {1, 1, 1, 1}}
  {{5}, {4, 1}, {3, 2}, {3, 1, 1}, {2, 2, 1}, {2, 1, 1, 1}, {1, 1, 1, 1, 1}}
Up to the fifth row, this is exactly the same as the colexicographic ordering A036037. The first row which differs is the sixth one, which reads ((6), (5,1), (4,2), (4,1,1), (3,3), (3,2,1), (3,1,1,1), (2,2,2), (2,2,1,1), (2,1,1,1,1), (1,1,1,1,1,1)). - _M. F. Hasler_, Jan 23 2020
From _Gus Wiseman_, May 08 2020: (Start)
The sequence of all partitions begins:
  ()         (3,2)        (2,1,1,1,1)    (2,2,1,1,1)
  (1)        (3,1,1)      (1,1,1,1,1,1)  (2,1,1,1,1,1)
  (2)        (2,2,1)      (7)            (1,1,1,1,1,1,1)
  (1,1)      (2,1,1,1)    (6,1)          (8)
  (3)        (1,1,1,1,1)  (5,2)          (7,1)
  (2,1)      (6)          (5,1,1)        (6,2)
  (1,1,1)    (5,1)        (4,3)          (6,1,1)
  (4)        (4,2)        (4,2,1)        (5,3)
  (3,1)      (4,1,1)      (4,1,1,1)      (5,2,1)
  (2,2)      (3,3)        (3,3,1)        (5,1,1,1)
  (2,1,1)    (3,2,1)      (3,2,2)        (4,4)
  (1,1,1,1)  (3,1,1,1)    (3,2,1,1)      (4,3,1)
  (5)        (2,2,2)      (3,1,1,1,1)    (4,2,2)
  (4,1)      (2,2,1,1)    (2,2,2,1)      (4,2,1,1)
The triangle with partitions shown as Heinz numbers (A129129) begins:
   1
   2
   3   4
   5   6   8
   7  10   9  12  16
  11  14  15  20  18  24  32
  13  22  21  28  25  30  40  27  36  48  64
  17  26  33  44  35  42  56  50  45  60  80  54  72  96 128
(End)
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Clarendon Press, Oxford, Fifth edition, 1979, p. 273.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 287.

Crossrefs

See A080576 Maple (graded reflected lexicographic) ordering.
See A036036 for the Hindenburg (graded reflected colexicographic) ordering (listed in the Abramowitz and Stegun Handbook).
See A036037 for graded colexicographic ordering.
See A228100 for the Fenner-Loizou (binary tree) ordering.
Differs from A036037 at a(48).
See A322761 for a compressed version.
Lexicographically ordered reversed partitions are A026791.
Reverse-colexicographically ordered partitions are A026792.
Compositions under this ordering are A066099.
Distinct parts of these partitions are counted by A115623.
Taking Heinz numbers gives A129129.
Lexicographically ordered partitions are A193073.
Colexicographically ordered partitions are A211992.
Reading partitions in reverse (weakly increasing) order gives A228531.
Lengths of these partitions are A238966.
Sorting partitions by Heinz number gives A296150.
The maxima of these partitions are A331581.
The length-sensitive version is A334439.

Programs

  • Magma
    &cat[&cat Partitions(n):n in[1..7]]; // Jason Kimberley, Oct 28 2011
    
  • Maple
    b:= (n, i)-> `if`(n=0 or i=1, [[1$n]], [map(x->
        [i, x[]], b(n-i, min(n-i, i)))[], b(n, i-1)[]]):
    T:= n-> map(x-> x[], b(n$2))[]:
    seq(T(n), n=1..8);  # Alois P. Heinz, Jan 29 2020
  • Mathematica
    <Jean-François Alcover, Dec 10 2012 *)
    revlexsort[f_,c_]:=OrderedQ[PadRight[{c,f}]];
    Join@@Table[Sort[IntegerPartitions[n],revlexsort],{n,0,8}] (* Gus Wiseman, May 08 2020 *)
  • PARI
    A080577_row(n)={vecsort(apply(t->Vecrev(t),partitions(n)),,4)} \\ M. F. Hasler, Jan 21 2020
  • Sage
    L = []
    for n in range(8): L += list(Partitions(n))
    flatten(L)   # Peter Luschny, Aug 12 2013
    

A036036 Triangle read by rows in which row n lists all the parts of all reversed partitions of n, sorted first by length and then lexicographically.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

First differs from A334442 for reversed partitions of 9. Namely, this sequence has (1,4,4) before (2,2,5), while A334442 has (2,2,5) before (1,4,4). - Gus Wiseman, May 07 2020
This is the "Abramowitz and Stegun" ordering of the partitions, referenced in numerous other sequences. The partitions are in reverse order of the conjugates of the partitions in Mathematica order (A080577). Each partition is the conjugate of the corresponding partition in Maple order (A080576). - Franklin T. Adams-Watters, Oct 18 2006
The "Abramowitz and Stegun" ordering of the partitions is the graded reflected colexicographic ordering of the partitions. - Daniel Forgues, Jan 19 2011
The "Abramowitz and Stegun" ordering of partitions has been traced back to C. F. Hindenburg, 1779, in the Knuth reference, p. 38. See the Hindenburg link, pp. 77-5 with the listing of the partitions for n=10. This is also mentioned in the P. Luschny link. - Wolfdieter Lang, Apr 04 2011
The "Abramowitz and Stegun" order used here means that the partitions of a given number are listed by increasing number of (nonzero) parts, then by increasing lexicographical order with parts in (weakly) indecreasing order. This differs from n=9 on from A334442 which considers reverse lexicographic order of parts in (weakly) decreasing order. - M. F. Hasler, Jul 12 2015, corrected thanks to Gus Wiseman, May 14 2020
This is the Abramowitz-Stegun ordering of reversed partitions (finite weakly increasing sequences of positive integers). The same ordering of non-reversed partitions is A334301. - Gus Wiseman, May 07 2020

Examples

			1
2; 1,1
3; 1,2; 1,1,1
4; 1,3; 2,2; 1,1,2; 1,1,1,1
5; 1,4; 2,3; 1,1,3; 1,2,2; 1,1,1,2; 1,1,1,1,1;
6; 1,5; 2,4; 3,3; 1,1,4; 1,2,3; 2,2,2; 1,1,1,3; 1,1,2,2; 1,1,1,1,2; 1,1,1,1,1,1;
...
		

References

  • Abramowitz and Stegun, Handbook, p. 831, column labeled "pi".
  • D. Knuth, The Art of Computer Programming, Vol. 4, fascicle 3, 7.2.1.4, Addison-Wesley, 2005.

Crossrefs

See A036037 for the graded colexicographic ordering.
See A080576 for the Maple (graded reflected lexicographic) ordering.
See A080577 for the Mathematica (graded reverse lexicographic) ordering.
See A193073 for the graded lexicographic ordering.
See A228100 for the Fenner-Loizou (binary tree) ordering.
The version ignoring length is A026791.
Same as A036037 with partitions reversed.
The lengths of these partitions are A036043.
The number of distinct parts is A103921.
The corresponding ordering of compositions is A124734.
Showing partitions as Heinz numbers gives A185974.
The version for non-reversed partitions is A334301.
Lexicographically ordered reversed partitions are A026791.
Sorting reversed partitions by Heinz number gives A112798.
The version for revlex instead of lex is A334302.
The version for revlex instead of colex is A334442.

Programs

  • Mathematica
    Join@@Table[Sort[Reverse/@IntegerPartitions[n]],{n,0,8}] (* Gus Wiseman, May 07 2020 *)
    - or -
    colen[f_,c_]:=OrderedQ[{Reverse[f],Reverse[c]}];
    Reverse/@Join@@Table[Sort[IntegerPartitions[n],colen],{n,0,8}] (* Gus Wiseman, May 07 2020 *)
  • PARI
    T036036(n,k)=k&&return(T036036(n)[k]);concat(partitions(n))
    \\ If 2nd arg "k" is not given, return the n-th row as a vector. Assumes PARI version >= 2.7.1. See A193073 for "hand made" code.
    concat(vector(8,n,T036036(n))) \\ to get the "flattened" sequence
    \\ M. F. Hasler, Jul 12 2015

Extensions

Edited by Daniel Forgues, Jan 21 2011
Edited by M. F. Hasler, Jul 12 2015
Name corrected by Gus Wiseman, May 12 2020

A211992 Triangle read by rows in which row n lists the partitions of n in colexicographic order.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Aug 18 2012

Keywords

Comments

The order of the partitions of every integer is reversed with respect to A026792. For example: in A026792 the partitions of 3 are listed as [3], [2, 1], [1, 1, 1], however here the partitions of 3 are listed as [1, 1, 1], [2, 1], [3].
Row n has length A006128(n). Row sums give A066186. Right border gives A000027. The equivalent sequence for compositions (ordered partitions) is A228525. - Omar E. Pol, Aug 24 2013
The representation of the partitions (for fixed n) is as (weakly) decreasing lists of parts, the order between individual partitions (for the same n) is co-lexicographic. The equivalent sequence for partitions as (weakly) increasing lists and lexicographic order is A026791. - Joerg Arndt, Sep 02 2013

Examples

			From _Omar E. Pol_, Aug 24 2013: (Start)
Illustration of initial terms:
-----------------------------------------
n      Diagram          Partition
-----------------------------------------
.       _
1      |_|              1;
.       _ _
2      |_| |            1, 1,
2      |_ _|            2;
.       _ _ _
3      |_| | |          1, 1, 1,
3      |_ _| |          2, 1,
3      |_ _ _|          3;
.       _ _ _ _
4      |_| | | |        1, 1, 1, 1,
4      |_ _| | |        2, 1, 1,
4      |_ _ _| |        3, 1,
4      |_ _|   |        2, 2,
4      |_ _ _ _|        4;
.       _ _ _ _ _
5      |_| | | | |      1, 1, 1, 1, 1,
5      |_ _| | | |      2, 1, 1, 1,
5      |_ _ _| | |      3, 1, 1,
5      |_ _|   | |      2, 2, 1,
5      |_ _ _ _| |      4, 1,
5      |_ _ _|   |      3, 2,
5      |_ _ _ _ _|      5;
.       _ _ _ _ _ _
6      |_| | | | | |    1, 1, 1, 1, 1, 1,
6      |_ _| | | | |    2, 1, 1, 1, 1,
6      |_ _ _| | | |    3, 1, 1, 1,
6      |_ _|   | | |    2, 2, 1, 1,
6      |_ _ _ _| | |    4, 1, 1,
6      |_ _ _|   | |    3, 2, 1,
6      |_ _ _ _ _| |    5, 1,
6      |_ _|   |   |    2, 2, 2,
6      |_ _ _ _|   |    4, 2,
6      |_ _ _|     |    3, 3,
6      |_ _ _ _ _ _|    6;
...
Triangle begins:
[1];
[1,1], [2];
[1,1,1], [2,1], [3];
[1,1,1,1], [2,1,1], [3,1], [2,2], [4];
[1,1,1,1,1], [2,1,1,1], [3,1,1], [2,2,1], [4,1], [3,2], [5];
[1,1,1,1,1,1], [2,1,1,1,1], [3,1,1,1], [2,2,1,1], [4,1,1], [3,2,1], [5,1], [2,2,2], [4,2], [3,3], [6];
(End)
From _Gus Wiseman_, May 10 2020: (Start)
The triangle with partitions shown as Heinz numbers (A334437) begins:
    1
    2
    4   3
    8   6   5
   16  12  10   9   7
   32  24  20  18  14  15  11
   64  48  40  36  28  30  22  27  21  25  13
  128  96  80  72  56  60  44  54  42  50  26  45  33  35  17
(End)
		

Crossrefs

The graded reversed version is A026792.
The length-sensitive refinement is A036037.
The version for reversed partitions is A080576.
Partition lengths are A193173.
Partition maxima are A194546.
Partition minima are A196931.
The version for compositions is A228525.
The Heinz numbers of these partitions are A334437.

Programs

  • Mathematica
    colex[f_,c_]:=OrderedQ[PadRight[{Reverse[f],Reverse[c]}]];
    Join@@Table[Sort[IntegerPartitions[n],colex],{n,0,6}] (* Gus Wiseman, May 10 2020 *)
  • PARI
    gen_part(n)=
    {  /* Generate partitions of n as weakly increasing lists (order is lex): */
        my(ct = 0);
        my(m, pt);
        my(x, y);
        \\ init:
        my( a = vector( n + (n<=1) ) );
        a[1] = 0;  a[2] = n;  m = 2;
        while ( m!=1,
            y = a[m] - 1;
            m -= 1;
            x = a[m] + 1;
            while ( x<=y,
                a[m] = x;
                y = y - x;
                m += 1;
            );
            a[m] = x + y;
            pt = vector(m, j, a[j]);
        /* for A026791 print partition: */
    \\        for (j=1, m, print1(pt[j],", ") );
        /* for A211992 print partition as weakly decreasing list (order is colex): */
            forstep (j=m, 1, -1, print1(pt[j],", ") );
            ct += 1;
        );
        return(ct);
    }
    for(n=1, 10, gen_part(n) );
    \\ Joerg Arndt, Sep 02 2013

A036037 Triangle read by rows in which row n lists all the parts of all the partitions of n, sorted first by length and then colexicographically.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

First differs from A334439 for partitions of 9. Namely, this sequence has (4,4,1) before (5,2,2), while A334439 has (5,2,2) before (4,4,1). - Gus Wiseman, May 08 2020
This is also a list of all the possible prime signatures of a number, arranged in graded colexicographic ordering. - N. J. A. Sloane, Feb 09 2014
This is also the Abramowitz-Stegun ordering of reversed partitions (A036036) if the partitions are reversed again after sorting. Partitions sorted first by sum and then colexicographically are A211992. - Gus Wiseman, May 08 2020

Examples

			First five rows are:
{{1}}
{{2}, {1, 1}}
{{3}, {2, 1}, {1, 1, 1}}
{{4}, {3, 1}, {2, 2}, {2, 1, 1}, {1, 1, 1, 1}}
{{5}, {4, 1}, {3, 2}, {3, 1, 1}, {2, 2, 1}, {2, 1, 1, 1}, {1, 1, 1, 1, 1}}
Up to the fifth row, this is exactly the same as the reverse lexicographic ordering A080577. The first row which differs is the sixth one, which reads ((6), (5,1), (4,2), (3,3), (4,1,1), (3,2,1), (2,2,2), (3,1,1,1), (2,2,1,1), (2,1,1,1,1), (1,1,1,1,1,1)). - _M. F. Hasler_, Jan 23 2020
From _Gus Wiseman_, May 08 2020: (Start)
The sequence of all partitions begins:
  ()         (3,2)        (2,1,1,1,1)
  (1)        (3,1,1)      (1,1,1,1,1,1)
  (2)        (2,2,1)      (7)
  (1,1)      (2,1,1,1)    (6,1)
  (3)        (1,1,1,1,1)  (5,2)
  (2,1)      (6)          (4,3)
  (1,1,1)    (5,1)        (5,1,1)
  (4)        (4,2)        (4,2,1)
  (3,1)      (3,3)        (3,3,1)
  (2,2)      (4,1,1)      (3,2,2)
  (2,1,1)    (3,2,1)      (4,1,1,1)
  (1,1,1,1)  (2,2,2)      (3,2,1,1)
  (5)        (3,1,1,1)    (2,2,2,1)
  (4,1)      (2,2,1,1)    (3,1,1,1,1)
(End)
		

Crossrefs

See A036036 for the graded reflected colexicographic ("Abramowitz and Stegun" or Hindenburg) ordering.
See A080576 for the graded reflected lexicographic ("Maple") ordering.
See A080577 for the graded reverse lexicographic ("Mathematica") ordering: differs from a(48) on!
See A228100 for the Fenner-Loizou (binary tree) ordering.
See also A036038, A036039, A036040: (multinomial coefficients).
Partition lengths are A036043.
Reversing all partitions gives A036036.
The number of distinct parts is A103921.
Taking Heinz numbers gives A185974.
The version ignoring length is A211992.
The version for revlex instead of colex is A334439.
Lexicographically ordered reversed partitions are A026791.
Reverse-lexicographically ordered partitions are A080577.
Sorting partitions by Heinz number gives A296150.

Programs

  • Mathematica
    Reverse/@Join@@Table[Sort[Reverse/@IntegerPartitions[n]],{n,8}] (* Gus Wiseman, May 08 2020 *)
    - or -
    colen[f_,c_]:=OrderedQ[{Reverse[f],Reverse[c]}];
    Join@@Table[Sort[IntegerPartitions[n],colen],{n,8}] (* Gus Wiseman, May 08 2020 *)

Extensions

Name corrected by Gus Wiseman, May 12 2020
Mathematica programs corrected to reflect offset of one and not zero by Robert Price, Jun 04 2020

A193073 Triangle in which n-th row lists all partitions of n, in graded lexicographical ordering.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Jul 15 2011

Keywords

Comments

The partitions of the integer n are sorted in lexicographical order (cf. link: sums are written with terms in decreasing order, then they are sorted in lexicographical (increasing) order), i.e., as [1,1,...,1], [2,1,...,1], [2,2,...], ..., [n].

Examples

			First five rows are:
[[1]]
[[1, 1], [2]]
[[1, 1, 1], [2, 1], [3]]
[[1, 1, 1, 1], [2, 1, 1], [2, 2], [3, 1], [4]]
[[1, 1, 1, 1, 1], [2, 1, 1, 1], [2, 2, 1], [3, 1, 1], [3, 2], [4, 1], [5]]
From _Gus Wiseman_, May 08 2020: (Start)
The sequence of all partitions begins:
  ()           (2,2,1)        (5,1)            (5,2)
  (1)          (3,1,1)        (6)              (6,1)
  (1,1)        (3,2)          (1,1,1,1,1,1,1)  (7)
  (2)          (4,1)          (2,1,1,1,1,1)    (1,1,1,1,1,1,1,1)
  (1,1,1)      (5)            (2,2,1,1,1)      (2,1,1,1,1,1,1)
  (2,1)        (1,1,1,1,1,1)  (2,2,2,1)        (2,2,1,1,1,1)
  (3)          (2,1,1,1,1)    (3,1,1,1,1)      (2,2,2,1,1)
  (1,1,1,1)    (2,2,1,1)      (3,2,1,1)        (2,2,2,2)
  (2,1,1)      (2,2,2)        (3,2,2)          (3,1,1,1,1,1)
  (2,2)        (3,1,1,1)      (3,3,1)          (3,2,1,1,1)
  (3,1)        (3,2,1)        (4,1,1,1)        (3,2,2,1)
  (4)          (3,3)          (4,2,1)          (3,3,1,1)
  (1,1,1,1,1)  (4,1,1)        (4,3)            (3,3,2)
  (2,1,1,1)    (4,2)          (5,1,1)          (4,1,1,1,1)
The triangle with partitions shown as Heinz numbers (A334434) begins:
    1
    2
    4   3
    8   6   5
   16  12   9  10   7
   32  24  18  20  15  14  11
   64  48  36  27  40  30  25  28  21  22  13
  128  96  72  54  80  60  45  50  56  42  35  44  33  26  17
(End)
		

Crossrefs

See A036036 for the Hindenburg (graded reflected colexicographic) ordering (listed in the Abramowitz and Stegun Handbook).
See A036037 for graded colexicographic ordering.
See A080576 for the Maple (graded reflected lexicographic) ordering.
See A080577 for the Mathematica (graded reverse lexicographic) ordering.
See A228100 for the Fenner-Loizou (binary tree) ordering.
A006128 gives row lengths.
Row n has A000041(n) partitions.
The version for reversed (weakly increasing) partitions is A026791.
Lengths of these partitions appear to be A049085.
Taking colex instead of lex gives A211992.
The generalization to compositions is A228351.
Sorting partitions by Heinz number gives A296150.
The length-sensitive refinement is A334301.
The Heinz numbers of these partitions are A334434.

Programs

  • Mathematica
    row[n_] := Flatten[Reverse[Reverse /@ SplitBy[IntegerPartitions[n], Length] ], 1]; Array[row, 19] // Flatten (* Jean-François Alcover, Dec 05 2016 *)
    lexsort[f_,c_]:=OrderedQ[PadRight[{f,c}]];
    Join@@Table[Sort[IntegerPartitions[n],lexsort],{n,0,8}] (* Gus Wiseman, May 08 2020 *)
  • PARI
    A193073_row(n)=concat(vecsort(apply(P->Vec(vecsort(P,,4)),partitions(n)))) \\ The two vecsort() are needed since the PARI function (version >= 2.7.1) yields the partitions in Abramowitz-Stegun order: sorted by increasing length, decreasing largest part, then lex order, with parts in increasing order. - M. F. Hasler, Jun 04 2018 [replaced older code from Jul 12 2015]
    
  • Sage
    def p(n, i):
        if n==0 or i==1: return [[1]*n]
        T = [[i] + x for x in p(n-i, i)] if i<=n else []
        return p(n, i-1) + T
    A193073 = lambda n: p(n,n)
    for n in (1..5): print(A193073(n)) # Peter Luschny, Aug 07 2015

A036043 Irregular triangle read by rows: row n (n >= 0) gives number of parts in all partitions of n (in Abramowitz and Stegun order).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The sequence of row lengths of this array is p(n) = A000041(n) (partition numbers).
The sequence of row sums is A006128(n).
The number of times k appears in row n is A008284(n,k). - Franklin T. Adams-Watters, Jan 12 2006
The next level (row) gets created from each node by adding one or two more nodes. If a single node is added, its value is one more than the value of its parent. If two nodes are added, the first is equal in value to the parent and the value of the second is one more than the value of the parent. See A128628. - Alford Arnold, Mar 27 2007
The 1's in the (flattened) sequence mark the start of a new row, the value that precedes the 1 equals the row number minus one. (I.e., the 1 preceded by a 0 is the start of row 1, the 1 preceded by a 6 is the start of row 7, etc.) - M. F. Hasler, Jun 06 2018
Also the maximum part in the n-th partition in graded lexicographic order (sum/lex, A193073). - Gus Wiseman, May 24 2020

Examples

			0;
1;
1, 2;
1, 2, 3;
1, 2, 2, 3, 4;
1, 2, 2, 3, 3, 4, 5;
1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 6;
1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6, 7;
		

References

  • Abramowitz and Stegun, Handbook, p. 831, column labeled "m".

Crossrefs

Row lengths are A000041.
Partition lengths of A036036 and A334301.
The version not sorted by length is A049085.
The generalization to compositions is A124736.
The Heinz number of the same partition is A334433.
The number of distinct elements in the same partition is A334440.
The maximum part of the same partition is A334441.
Lexicographically ordered reversed partitions are A026791.
Lexicographically ordered partitions are A193073.

Programs

  • Maple
    with(combinat): nmax:=9: for n from 1 to nmax do y(n):=numbpart(n): P(n):=sort(partition(n)): for k from 1 to y(n) do B(k) := P(n)[k] od: for k from 1 to y(n) do s:=0: j:=0: while sJohannes W. Meijer, Jun 21 2010, revised Nov 29 2012
    # alternative implementation based on A119441 by R. J. Mathar, Jul 12 2013
    A036043 := proc(n,k)
        local pi;
        pi := ASPrts(n)[k] ;
        nops(pi) ;
    end proc:
    for n from 1 to 10 do
        for k from 1 to A000041(n) do
            printf("%d,",A036043(n,k)) ;
        end do:
        printf("\n") ;
    end do:
  • Mathematica
    Table[Length/@Sort[IntegerPartitions[n]],{n,0,30}] (* Gus Wiseman, May 22 2020 *)
  • PARI
    A036043(n,k)=#partitions(n)[k] \\ M. F. Hasler, Jun 06 2018
    
  • SageMath
    def A036043_row(n):
        return [len(p) for k in (0..n) for p in Partitions(n, length=k)]
    for n in (0..10): print(A036043_row(n)) # Peter Luschny, Nov 02 2019

Formula

a(n) = A001222(A334433(n)). - Gus Wiseman, May 22 2020

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Jun 17 2001
a(0) inserted by Franklin T. Adams-Watters, Jun 24 2014
Incorrect formula deleted by M. F. Hasler, Jun 06 2018

A026792 List of juxtaposed reverse-lexicographically ordered partitions of the positive integers.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The representation of the partitions (for fixed n) is as (weakly) decreasing lists of parts, the order between individual partitions (for the same n) is (list-)reversed lexicographic; see examples. [Joerg Arndt, Sep 03 2013]
Written as a triangle; row n has length A006128(n); row sums give A066186. Also written as an irregular tetrahedron in which T(n,j,k) is the k-th largest part of the j-th partition of n; the sum of column k in the slice n is A181187(n,k); right border of the slices gives A182715. - Omar E. Pol, Mar 25 2012
The equivalent sequence for compositions (ordered partitions) is A228351. - Omar E. Pol, Sep 03 2013
This is the reverse-colexicographic order of integer partitions, or the reflected reverse-lexicographic order of reversed integer partitions. It is not reverse-lexicographic order (A080577), wherein we would have (3,1) before (2,2). - Gus Wiseman, May 12 2020

Examples

			E.g. the partitions of 3 (3,2+1,1+1+1) appear as the string 3,2,1,1,1,1.
So the list begins:
1
2, 1, 1,
3, 2, 1, 1, 1, 1,
4, 2, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1,
5, 3, 2, 4, 1, 2, 2, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
...
From _Omar E. Pol_, Sep 03 2013: (Start)
Illustration of initial terms:
---------------------------------
n  j     Diagram     Partition
---------------------------------
.         _
1  1     |_|         1;
.         _ _
2  1     |_  |       2,
2  2     |_|_|       1, 1;
.         _ _ _
3  1     |_ _  |     3,
3  2     |_  | |     2, 1,
3  3     |_|_|_|     1, 1, 1;
.         _ _ _ _
4  1     |_ _    |   4,
4  2     |_ _|_  |   2, 2,
4  3     |_ _  | |   3, 1,
4  4     |_  | | |   2, 1, 1,
4  5     |_|_|_|_|   1, 1, 1, 1;
...
(End)
From _Gus Wiseman_, May 12 2020: (Start)
This sequence can also be interpreted as the following triangle, whose n-th row is itself a finite triangle with A000041(n) rows. Showing these partitions as their Heinz numbers gives A334436.
                             0
                            (1)
                          (2)(11)
                        (3)(21)(111)
                   (4)(22)(31)(211)(1111)
             (5)(32)(41)(221)(311)(2111)(11111)
  (6)(33)(42)(222)(51)(321)(411)(2211)(3111)(21111)(111111)
(End)
		

Crossrefs

The reflected version for reversed partitions is A080577.
The partition minima appear to be A182715.
The graded reversed version is A211992.
The version for compositions is A228351.
The Heinz numbers of these partitions are A334436.

Programs

  • Mathematica
    revcolex[f_,c_]:=OrderedQ[PadRight[{Reverse[c],Reverse[f]}]];
    Join@@Table[Sort[IntegerPartitions[n],revcolex],{n,0,8}] (* reverse-colexicographic order, Gus Wiseman, May 10 2020 *)
    - or -
    revlex[f_,c_]:=OrderedQ[PadRight[{c,f}]];
    Reverse/@Join@@Table[Sort[Reverse/@IntegerPartitions[n],revlex],{n,0,8}] (* reflected reverse-lexicographic order, Gus Wiseman, May 12 2020 *)

Extensions

Terms 81st, 83rd and 84th corrected by Omar E. Pol, Aug 16 2009

A334439 Irregular triangle whose rows are all integer partitions sorted first by sum, then by length, and finally reverse-lexicographically.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 03 2020

Keywords

Comments

First differs from A036037 for partitions of 9. Namely, this sequence has (5,2,2) before (4,4,1), while A036037 has (4,4,1) before (5,2,2).
This is the Abramowitz-Stegun ordering of integer partitions (A334301) except that the finer order is reverse-lexicographic instead of lexicographic. The version for reversed partitions is A334302.

Examples

			The sequence of all partitions begins:
  ()      (32)     (21111)   (22111)    (4211)      (63)
  (1)     (311)    (111111)  (211111)   (3311)      (54)
  (2)     (221)    (7)       (1111111)  (3221)      (711)
  (11)    (2111)   (61)      (8)        (2222)      (621)
  (3)     (11111)  (52)      (71)       (41111)     (531)
  (21)    (6)      (43)      (62)       (32111)     (522)
  (111)   (51)     (511)     (53)       (22211)     (441)
  (4)     (42)     (421)     (44)       (311111)    (432)
  (31)    (33)     (331)     (611)      (221111)    (333)
  (22)    (411)    (322)     (521)      (2111111)   (6111)
  (211)   (321)    (4111)    (431)      (11111111)  (5211)
  (1111)  (222)    (3211)    (422)      (9)         (4311)
  (5)     (3111)   (2221)    (332)      (81)        (4221)
  (41)    (2211)   (31111)   (5111)     (72)        (3321)
This sequence can also be interpreted as the following triangle, whose n-th row is itself a finite triangle with A000041(n) rows.
                  0
                 (1)
               (2)(11)
             (3)(21)(111)
        (4)(31)(22)(211)(1111)
  (5)(41)(32)(311)(221)(2111)(11111)
Showing partitions as their Heinz numbers (see A334438) gives:
   1
   2
   3   4
   5   6   8
   7  10   9  12  16
  11  14  15  20  18  24  32
  13  22  21  25  28  30  27  40  36  48  64
  17  26  33  35  44  42  50  45  56  60  54  80  72  96 128
		

Crossrefs

The version for colex instead of revlex is A036037.
Row lengths are A036043.
Ignoring length gives A080577.
Number of distinct elements in row n appears to be A103921(n).
The version for compositions is A296774.
The Abramowitz-Stegun version (sum/length/lex) is A334301.
The version for reversed partitions is A334302.
Taking Heinz numbers gives A334438.
The version with partitions reversed is A334442.
Lexicographically ordered reversed partitions are A026791.
Lexicographically ordered partitions are A193073.
Sorting partitions by Heinz number gives A296150.

Programs

  • Mathematica
    revlensort[f_,c_]:=If[Length[f]!=Length[c],Length[f]
    				

A185974 Partitions in Abramowitz-Stegun order A036036 mapped one-to-one to positive integers.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 7, 10, 9, 12, 16, 11, 14, 15, 20, 18, 24, 32, 13, 22, 21, 25, 28, 30, 27, 40, 36, 48, 64, 17, 26, 33, 35, 44, 42, 50, 45, 56, 60, 54, 80, 72, 96, 128, 19, 34, 39, 55, 49, 52, 66, 70, 63, 75, 88, 84, 100, 90, 81, 112, 120, 108, 160, 144, 192, 256, 23, 38, 51, 65, 77, 68, 78, 110, 98, 99, 105, 125, 104, 132, 140, 126, 150, 135, 176, 168, 200, 180, 162, 224, 240, 216, 320, 288, 384, 512, 29, 46, 57, 85, 91, 121, 76, 102, 130, 154, 117, 165, 147, 175, 136, 156, 220, 196, 198, 210, 250, 189, 225, 208, 264, 280, 252, 300, 270, 243, 352, 336, 400, 360, 324, 448, 480, 432, 640, 576, 768, 1024
Offset: 0

Views

Author

Wolfdieter Lang, Feb 10 2011

Keywords

Comments

First differs from A334438 (shifted left once) at a(75) = 98, A334438(76) = 99. - Gus Wiseman, May 20 2020
This mapping of the set of all partitions of N >= 0 to {1, 2, 3, ...} (set of natural numbers) is one to one (bijective). The empty partition for N = 0 maps to 1.
A129129 seems to be analogous, except that the partition ordering A080577 is used. This ordering, however, does not care about the number of parts: e.g., 1^2,4 = 4,1^2 comes before 3^2, so a(23)=28 and a(22)=25 are interchanged.
Also Heinz numbers of all reversed integer partitions (finite weakly increasing sequences of positive integers), sorted first by sum, then by length, and finally lexicographically, where the Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). The version for non-reversed partitions is A334433. - Gus Wiseman, May 20 2020

Examples

			a(22) = 25 = prime(3)^2 because the 22nd partition in A-St order is the 2-part partition (3,3) of N = 6, because A026905(5) = 18 < 22 <= A026905(6) = 29.
a(23) = 28 = prime(1)^2*prime(4) corresponds to the partition 1+1+4 = 4+1+1 with three parts, also of N = 6.
From _Gus Wiseman_, May 20 2020: (Start)
Triangle begins:
   1
   2
   3   4
   5   6   8
   7  10   9  12  16
  11  14  15  20  18  24  32
  13  22  21  25  28  30  27  40  36  48  64
  17  26  33  35  44  42  50  45  56  60  54  80  72  96 128
As a triangle of reversed partitions we have:
                             0
                            (1)
                          (2)(11)
                        (3)(12)(111)
                   (4)(13)(22)(112)(1111)
             (5)(14)(23)(113)(122)(1112)(11111)
  (6)(15)(24)(33)(114)(123)(222)(1113)(1122)(11112)(111111)
(End)
		

Crossrefs

Row lengths are A000041.
The constructive version is A036036.
Also Heinz numbers of the partitions in A036037.
The generalization to compositions is A124734.
The version for non-reversed partitions is A334433.
The non-reversed length-insensitive version is A334434.
The opposite version (sum/length/revlex) is A334435.
Ignoring length gives A334437.
Sorting reversed partitions by Heinz number gives A112798.
Partitions in lexicographic order are A193073.
Partitions in colexicographic order are A211992.
Graded Heinz numbers are A215366.

Programs

  • Mathematica
    Join@@Table[Times@@Prime/@#&/@Sort[Reverse/@IntegerPartitions[n]],{n,0,8}] (* Gus Wiseman, May 21 2020 *)
  • PARI
    A185974_row(n)=[vecprod([prime(i)|i<-p])|p<-partitions(n)] \\ below a helper function:
    index_of_partition(n)={for(r=0, oo, my(c = numbpart(r)); n >= c || return([r,n+1]); n -= c)}
    /* A185974(n,k), 1 <= k <= A000041(n), gives the k-th partition of n >= 0; if k is omitted, A185974(n) return the term of index n of the flattened sequence a(n >= 0).
      This function is used in other sequences (such as A122172) which need to access the n-th partition as listed in A-S order. */
    A185974(n, k=index_of_partition(n))=A185974_row(iferr(k[1], E, k=[k,k]; n))[k[2]] \\ (End)

Formula

a(n) = Product_{j=1..N(n)} p(j)^e(j), with p(j):=A000040(j) (j-th prime), and the exponent e(j) >= 0 of the part j in the n-th partition written in Abramowitz-Stegun (A-St) order, indicated in A036036. Note that j^0 is not 1 but has to be omitted in the partition. N(n) is the index (argument) of the smallest A026905-number greater than or equal to n (the index of the A026905-ceiling of n).
From Gus Wiseman, May 21 2020: (Start)
A001221(a(n)) = A103921(n).
A001222(a(n)) = A036043(n).
A056239(a(n)) = A036042(n).
A061395(a(n)) = A049085(n).
(End)

Extensions

Examples edited by M. F. Hasler, Jan 07 2024

A334433 Heinz numbers of all integer partitions sorted first by sum, then by length, and finally lexicographically.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 12, 16, 11, 15, 14, 18, 20, 24, 32, 13, 25, 21, 22, 27, 30, 28, 36, 40, 48, 64, 17, 35, 33, 26, 45, 50, 42, 44, 54, 60, 56, 72, 80, 96, 128, 19, 49, 55, 39, 34, 75, 63, 70, 66, 52, 81, 90, 100, 84, 88, 108, 120, 112, 144, 160, 192, 256
Offset: 0

Views

Author

Gus Wiseman, Apr 30 2020

Keywords

Comments

First differs from A334435 at a(75) = 99, A334435(75) = 98.
A permutation of the positive integers.
This is the Abramowitz-Stegun ordering of integer partitions when the parts are read in the usual (weakly decreasing) order. The case of reversed (weakly increasing) partitions is A185974.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
As a triangle with row lengths A000041, the sequence starts {{1},{2},{3,4},{5,6,8},...}, so offset is 0.

Examples

			The sequence of terms together with their prime indices begins:
    1: {}            32: {1,1,1,1,1}       42: {1,2,4}
    2: {1}           13: {6}               44: {1,1,5}
    3: {2}           25: {3,3}             54: {1,2,2,2}
    4: {1,1}         21: {2,4}             60: {1,1,2,3}
    5: {3}           22: {1,5}             56: {1,1,1,4}
    6: {1,2}         27: {2,2,2}           72: {1,1,1,2,2}
    8: {1,1,1}       30: {1,2,3}           80: {1,1,1,1,3}
    7: {4}           28: {1,1,4}           96: {1,1,1,1,1,2}
    9: {2,2}         36: {1,1,2,2}        128: {1,1,1,1,1,1,1}
   10: {1,3}         40: {1,1,1,3}         19: {8}
   12: {1,1,2}       48: {1,1,1,1,2}       49: {4,4}
   16: {1,1,1,1}     64: {1,1,1,1,1,1}     55: {3,5}
   11: {5}           17: {7}               39: {2,6}
   15: {2,3}         35: {3,4}             34: {1,7}
   14: {1,4}         33: {2,5}             75: {2,3,3}
   18: {1,2,2}       26: {1,6}             63: {2,2,4}
   20: {1,1,3}       45: {2,2,3}           70: {1,3,4}
   24: {1,1,1,2}     50: {1,3,3}           66: {1,2,5}
Triangle begins:
   1
   2
   3   4
   5   6   8
   7   9  10  12  16
  11  15  14  18  20  24  32
  13  25  21  22  27  30  28  36  40  48  64
  17  35  33  26  45  50  42  44  54  60  56  72  80  96 128
This corresponds to the tetrangle:
                  0
                 (1)
               (2)(11)
             (3)(21)(111)
        (4)(22)(31)(211)(1111)
  (5)(32)(41)(221)(311)(2111)(11111)
		

Crossrefs

Row lengths are A000041.
Compositions under the same order are A124734 (triangle).
The version for reversed (weakly increasing) partitions is A185974.
The constructive version is A334301.
Ignoring length gives A334434, or A334437 for reversed partitions.
The dual version (sum/length/revlex) is A334438.
Lexicographically ordered reversed partitions are A026791.
Reversed partitions in Abramowitz-Stegun (sum/length/lex) order are A036036.
Partitions in increasing-length colexicographic order (sum/length/colex) are A036037.
Graded reverse-lexicographically ordered partitions are A080577.
Sorting reversed partitions by Heinz number gives A112798.
Graded lexicographically ordered partitions are A193073.
Graded Heinz numbers are A215366.
Sorting partitions by Heinz number gives A296150.
Partitions in increasing-length reverse-lexicographic order (sum/length/revlex) are A334439 (not A036037).

Programs

  • Mathematica
    Join@@Table[Times@@Prime/@#&/@Sort[IntegerPartitions[n]],{n,0,8}]

Formula

A001222(a(n)) = A036043(n).
Showing 1-10 of 41 results. Next