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

A066099 Triangle read by rows, in which row n lists the compositions of n in reverse lexicographic order.

Original entry on oeis.org

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

Views

Author

Alford Arnold, Dec 30 2001

Keywords

Comments

The representation of the compositions (for fixed n) is as lists of parts, the order between individual compositions (for the same n) is (list-)reversed lexicographic; see the example by Omar E. Pol. - Joerg Arndt, Sep 03 2013
This is the standard ordering for compositions in this database; it is similar to the Mathematica ordering for partitions (A080577). Other composition orderings include A124734 (similar to the Abramowitz & Stegun ordering for partitions, A036036), A108244 (similar to the Maple partition ordering, A080576), etc (see crossrefs).
Factorize each term in A057335; sequence records the values of the resulting exponents. It also runs through all possible permutations of multiset digits.
This can be regarded as a table in two ways: with each composition as a row, or with the compositions of each integer as a row. The first way has A000120 as row lengths and A070939 as row sums; the second has A001792 as row lengths and A001788 as row sums. - Franklin T. Adams-Watters, Nov 06 2006
This sequence includes every finite sequence of positive integers. - Franklin T. Adams-Watters, Nov 06 2006
Compositions (or ordered partitions) are also generated in sequence A101211. - Alford Arnold, Dec 12 2006
The equivalent sequence for partitions is A228531. - Omar E. Pol, Sep 03 2013
The sole partition of zero has no components, not a single component of length one. Hence the first nonempty row is row 1. - Franklin T. Adams-Watters, Apr 02 2014 [Edited by Andrey Zabolotskiy, May 19 2018]
See sequence A261300 for another version where the terms of each composition are concatenated to form one single integer: (0, 1, 2, 11, 3, 21, 12, 111,...). This also shows how the terms can be obtained from the binary numbers A007088, cf. Arnold's first Example. - M. F. Hasler, Aug 29 2015
The k-th composition in the list is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This is described as the standard ordering used in the OEIS, although the sister sequence A228351 is also sometimes considered to be canonical. Both sequences define a bijective correspondence between nonnegative integers and integer compositions. - Gus Wiseman, May 19 2020
First differences of A030303 = positions of bits 1 in the concatenation A030190 (= A030302) of numbers written in binary (A007088). - Indices of record values (= first occurrence of n) are given by A005183: a(A005183(n)) = n, cf. FORMULA for more. - M. F. Hasler, Oct 12 2020
The geometric mean approaches the Somos constant (A112302). - Jwalin Bhatt, Feb 10 2025

Examples

			A057335 begins 1 2 4 6 8 12 18 30 16 24 36 ... so we can write
  1 2 1 3 2 1 1 4 3 2 2 1 1 1 1 ...
  . . 1 . 1 2 1 . 1 2 1 3 2 1 1 ...
  . . . . . . 1 . . . 1 . 1 2 1 ...
  . . . . . . . . . . . . . . 1 ...
and the columns here gives the rows of the triangle, which begins
  1
  2; 1 1
  3; 2 1; 1 2; 1 1 1
  4; 3 1; 2 2; 2 1 1; 1 3; 1 2 1; 1 1 2; 1 1 1 1
  ...
From _Omar E. Pol_, Sep 03 2013: (Start)
Illustration of initial terms:
  -----------------------------------
  n  j       Diagram   Composition j
  -----------------------------------
  .               _
  1  1           |_|   1;
  .             _ _
  2  1         |  _|   2,
  2  2         |_|_|   1, 1;
  .           _ _ _
  3  1       |    _|   3,
  3  2       |  _|_|   2, 1,
  3  3       | |  _|   1, 2,
  3  4       |_|_|_|   1, 1, 1;
  .         _ _ _ _
  4  1     |      _|   4,
  4  2     |    _|_|   3, 1,
  4  3     |   |  _|   2, 2,
  4  4     |  _|_|_|   2, 1, 1,
  4  5     | |    _|   1, 3,
  4  6     | |  _|_|   1, 2, 1,
  4  7     | | |  _|   1, 1, 2,
  4  8     |_|_|_|_|   1, 1, 1, 1;
(End)
		

Crossrefs

Lists of compositions of integers: this sequence (reverse lexicographic order; minus one gives A108730), A228351 (reverse colexicographic order - every composition is reversed; minus one gives A163510), A228369 (lexicographic), A228525 (colexicographic), A124734 (length, then lexicographic; minus one gives A124735), A296774 (length, then reverse lexicographic), A337243 (length, then colexicographic), A337259 (length, then reverse colexicographic), A296773 (decreasing length, then lexicographic), A296772 (decreasing length, then reverse lexicographic), A337260 (decreasing length, then colexicographic), A108244 (decreasing length, then reverse colexicographic), also A101211 and A227736 (run lengths of bits).
Cf. row length and row sums for different splittings into rows: A000120, A070939, A001792, A001788.
Cf. lists of partitions of integers, or multisets of integers: A026791 and crosserfs therein, A112798 and crossrefs therein.
See link for additional crossrefs pertaining to standard compositions.
A related ranking of finite sets is A048793/A272020.

Programs

  • Haskell
    a066099 = (!!) a066099_list
    a066099_list = concat a066099_tabf
    a066099_tabf = map a066099_row [1..]
    a066099_row n = reverse $ a228351_row n
    -- (each composition as a row)
    -- Peter Kagey, Aug 25 2016
    
  • Mathematica
    Table[FactorInteger[Apply[Times, Map[Prime, Accumulate @ IntegerDigits[n, 2]]]][[All, -1]], {n, 41}] // Flatten (* Michael De Vlieger, Jul 11 2017 *)
    stc[n_] := Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]] // Reverse;
    Table[stc[n], {n, 0, 20}] // Flatten (* Gus Wiseman, May 19 2020 *)
    Table[Reverse @ LexicographicSort @ Flatten[Permutations /@ Partitions[n], 1], {n, 10}] // Flatten (* Eric W. Weisstein, Jun 26 2023 *)
  • PARI
    arow(n) = {local(v=vector(n),j=0,k=0);
       while(n>0,k++; if(n%2==1,v[j++]=k;k=0);n\=2);
       vector(j,i,v[j-i+1])} \\ returns empty for n=0. - Franklin T. Adams-Watters, Apr 02 2014
    
  • Python
    from itertools import islice
    from itertools import accumulate, count, groupby, islice
    def A066099_gen():
        for i in count(1):
            yield [len(list(g)) for _,g in groupby(accumulate(int(b) for b in bin(i)[2:]))]
    A066099 = list(islice(A066099_gen(), 120))  # Jwalin Bhatt, Feb 28 2025
  • Sage
    def a_row(n): return list(reversed(Compositions(n)))
    flatten([a_row(n) for n in range(1,6)]) # Peter Luschny, May 19 2018
    

Formula

From M. F. Hasler, Oct 12 2020: (Start)
a(n) = A030303(n+1) - A030303(n).
a(A005183(n)) = n; a(A005183(n)+1) = n-1 (n>1); a(A005183(n)+2) = 1. (End)

Extensions

Edited with additional terms by Franklin T. Adams-Watters, Nov 06 2006
0th row removed by Andrey Zabolotskiy, May 19 2018

A228351 Triangle read by rows in which row n lists the compositions (ordered partitions) of n (see Comments lines for definition).

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Aug 30 2013

Keywords

Comments

The representation of the compositions (for fixed n) is as lists of parts, the order between individual compositions (for the same n) is (list-)reversed co-lexicographic. - Joerg Arndt, Sep 02 2013
Dropping the "(list-)reversed" in the comment above gives A228525.
The equivalent sequence for partitions is A026792.
This sequence lists (without repetitions) all finite compositions, in such a way that, if [P_1, ..., P_r] denotes the composition occupying the n-th position in the list, then (((2*n/2^(P_1)-1)/2^(P_2)-1)/...)/2^(P_r)-1 = 0. - Lorenzo Sauras Altuzarra, Jan 22 2020
The k-th composition in the list is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, and taking first differences. Reversing again gives A066099, which is described as the standard ordering. Both sequences define a bijective correspondence between nonnegative integers and integer compositions. - Gus Wiseman, Apr 01 2020
It follows from the previous comment that A000120(k) is the length of the k-th composition that is listed by this sequence (recall that A000120(k) is the number of 1's in the binary expansion of k). - Lorenzo Sauras Altuzarra, Sep 29 2020

Examples

			Illustration of initial terms:
-----------------------------------
n  j     Diagram     Composition j
-----------------------------------
.         _
1  1     |_|         1;
.         _ _
2  1     |_  |       2,
2  2     |_|_|       1, 1;
.         _ _ _
3  1     |_    |     3,
3  2     |_|_  |     1, 2,
3  3     |_  | |     2, 1,
3  4     |_|_|_|     1, 1, 1;
.         _ _ _ _
4  1     |_      |   4,
4  2     |_|_    |   1, 3,
4  3     |_  |   |   2, 2,
4  4     |_|_|_  |   1, 1, 2,
4  5     |_    | |   3, 1,
4  6     |_|_  | |   1, 2, 1,
4  7     |_  | | |   2, 1, 1,
4  8     |_|_|_|_|   1, 1, 1, 1;
.
Triangle begins:
[1];
[2],[1,1];
[3],[1,2],[2,1],[1,1,1];
[4],[1,3],[2,2],[1,1,2],[3,1],[1,2,1],[2,1,1],[1,1,1,1];
[5],[1,4],[2,3],[1,1,3],[3,2],[1,2,2],[2,1,2],[1,1,1,2],[4,1],[1,3,1],[2,2,1],[1,1,2,1],[3,1,1],[1,2,1,1],[2,1,1,1],[1,1,1,1,1];
...
For example [1,2] occupies the 5th position in the corresponding list of compositions and indeed (2*5/2^1-1)/2^2-1 = 0. - _Lorenzo Sauras Altuzarra_, Jan 22 2020
12 --binary expansion--> [1,1,0,0] --reverse--> [0,0,1,1] --positions of 1's--> [3,4] --prepend 0--> [0,3,4] --first differences--> [3,1]. - _Lorenzo Sauras Altuzarra_, Sep 29 2020
		

Crossrefs

Row n has length A001792(n-1). Row sums give A001787, n >= 1.
Cf. A000120 (binary weight), A001511, A006519, A011782, A026792, A065120.
A related ranking of finite sets is A048793/A272020.
All of the following consider the k-th row to be the k-th composition, ignoring the coarser grouping by sum.
- Indices of weakly increasing rows are A114994.
- Indices of weakly decreasing rows are A225620.
- Indices of strictly decreasing rows are A333255.
- Indices of strictly increasing rows are A333256.
- Indices of reversed interval rows A164894.
- Indices of interval rows are A246534.
- Indices of strict rows are A233564.
- Indices of constant rows are A272919.
- Indices of anti-run rows are A333489.
- Row k has A124767(k) runs and A333381(k) anti-runs.
- Row k has GCD A326674(k) and LCM A333226(k).
- Row k has Heinz number A333219(k).
Equals A163510+1, termwise.
Cf. A124734 (increasing length, then lexicographic).
Cf. A296774 (increasing length, then reverse lexicographic).
Cf. A337243 (increasing length, then colexicographic).
Cf. A337259 (increasing length, then reverse colexicographic).
Cf. A296773 (decreasing length, then lexicographic).
Cf. A296772 (decreasing length, then reverse lexicographic).
Cf. A337260 (decreasing length, then colexicographic).
Cf. A108244 (decreasing length, then reverse colexicographic).
Cf. A228369 (lexicographic).
Cf. A066099 (reverse lexicographic).
Cf. A228525 (colexicographic).

Programs

  • Haskell
    a228351 n = a228351_list !! (n - 1)
    a228351_list = concatMap a228351_row [1..]
    a228351_row 0 = []
    a228351_row n = a001511 n : a228351_row (n `div` 2^(a001511 n))
    -- Peter Kagey, Jun 27 2016
    
  • Maple
    # Program computing the sequence:
    A228351 := proc(n) local c, k, L, N: L, N := [], [seq(2*r, r = 1 .. n)]: for k in N do c := 0: while k != 0 do if gcd(k, 2) = 2 then k := k/2: c := c+1: else L := [op(L), op(c)]: k := k-1: c := 0: fi: od: od: L[n]: end: # Lorenzo Sauras Altuzarra, Jan 22 2020
    # Program computing the list of compositions:
    List := proc(n) local c, k, L, M, N: L, M, N := [], [], [seq(2*r, r = 1 .. 2^n-1)]: for k in N do c := 0: while k != 0 do if gcd(k, 2) = 2 then k := k/2: c := c+1: else L := [op(L), c]: k := k-1: c := 0: fi: od: M := [op(M), L]: L := []: od: M: end: # Lorenzo Sauras Altuzarra, Jan 22 2020
  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Differences[Prepend[bpe[n],0]],{n,0,30}] (* Gus Wiseman, Apr 01 2020 *)
  • Python
    from itertools import count, islice
    def A228351_gen(): # generator of terms
        for n in count(1):
            k = n
            while k:
                yield (s:=(~k&k-1).bit_length()+1)
                k >>= s
    A228351_list = list(islice(A228351_gen(),30)) # Chai Wah Wu, Jul 17 2023

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

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

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]
    				

A334302 Irregular triangle read by rows where row k is the k-th reversed integer partition, if reversed partitions are sorted first by sum, then by length, and finally reverse-lexicographically.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Apr 30 2020

Keywords

Examples

			The sequence of all reversed partitions begins:
  ()         (1,4)        (1,1,1,1,2)
  (1)        (1,2,2)      (1,1,1,1,1,1)
  (2)        (1,1,3)      (7)
  (1,1)      (1,1,1,2)    (3,4)
  (3)        (1,1,1,1,1)  (2,5)
  (1,2)      (6)          (1,6)
  (1,1,1)    (3,3)        (2,2,3)
  (4)        (2,4)        (1,3,3)
  (2,2)      (1,5)        (1,2,4)
  (1,3)      (2,2,2)      (1,1,5)
  (1,1,2)    (1,2,3)      (1,2,2,2)
  (1,1,1,1)  (1,1,4)      (1,1,2,3)
  (5)        (1,1,2,2)    (1,1,1,4)
  (2,3)      (1,1,1,3)    (1,1,1,2,2)
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) (1,1)
                    (3) (1,2) (1,1,1)
            (4) (2,2) (1,3) (1,1,2) (1,1,1,1)
  (5) (2,3) (1,4) (1,2,2) (1,1,3) (1,1,1,2) (1,1,1,1,1)
Showing partitions as their Heinz numbers (see A334435) gives:
   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
		

Crossrefs

Row lengths are A036043.
Lexicographically ordered reversed partitions are A026791.
The dual ordering (sum/length/lex) of reversed partitions is A036036.
Reverse-lexicographically ordered partitions are A080577.
Sorting reversed partitions by Heinz number gives A112798.
Lexicographically ordered partitions are A193073.
Graded Heinz numbers are A215366.
Ignoring length gives A228531.
Sorting partitions by Heinz number gives A296150.
The version for compositions is A296774.
The dual ordering (sum/length/lex) of non-reversed partitions is A334301.
Taking Heinz numbers gives A334435.
The version for regular (non-reversed) partitions is A334439 (not A036037).

Programs

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

A334435 Heinz numbers of all reversed integer partitions sorted first by sum, then by length, and finally reverse-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, May 02 2020

Keywords

Comments

First differs from A334433 at a(75) = 99, A334433(75) = 98.
First differs from A334436 at a(22) = 22, A334436(22) = 27.
A permutation of the positive integers.
Reversed integer partitions are finite weakly increasing sequences of positive integers.
This is the Abramowitz-Stegun ordering of reversed partitions (A185974) except that the finer order is reverse-lexicographic instead of lexicographic. The version for non-reversed partitions is A334438.
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 following tetrangle:
                  0
                 (1)
               (2)(11)
             (3)(12)(111)
        (4)(22)(13)(112)(1111)
  (5)(23)(14)(122)(113)(1112)(11111)
		

Crossrefs

Row lengths are A000041.
The dual version (sum/length/lex) is A185974.
Compositions under the same order are A296774 (triangle).
The constructive version is A334302.
Ignoring length gives A334436.
The version for non-reversed partitions is A334438.
Partitions in this order (sum/length/revlex) are A334439.
Lexicographically ordered reversed partitions are A026791.
Reversed partitions in Abramowitz-Stegun (sum/length/lex) order are A036036.
Partitions in increasing-length colex order (sum/length/colex) are A036037.
Reverse-lexicographically ordered partitions are A080577.
Sorting reversed partitions by Heinz number gives A112798.
Graded lexicographically ordered partitions are A193073.
Partitions in colexicographic (sum/colex) order are A211992.
Graded Heinz numbers are given by A215366.
Sorting partitions by Heinz number gives A296150.

Programs

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

Formula

A001222(a(n)) = A036043(n).

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

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
Offset: 0

Views

Author

Gus Wiseman, May 03 2020

Keywords

Comments

First differs from A185974 shifted left once at a(76) = 99, A185974(75) = 98.
A permutation of the positive integers.
This is the Abramowitz-Stegun ordering of integer partitions (A334433) except that the finer order is reverse-lexicographic instead of lexicographic. The version for reversed partitions is A334435.
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}       50: {1,3,3}
    2: {1}           13: {6}               45: {2,2,3}
    3: {2}           22: {1,5}             56: {1,1,1,4}
    4: {1,1}         21: {2,4}             60: {1,1,2,3}
    5: {3}           25: {3,3}             54: {1,2,2,2}
    6: {1,2}         28: {1,1,4}           80: {1,1,1,1,3}
    8: {1,1,1}       30: {1,2,3}           72: {1,1,1,2,2}
    7: {4}           27: {2,2,2}           96: {1,1,1,1,1,2}
   10: {1,3}         40: {1,1,1,3}        128: {1,1,1,1,1,1,1}
    9: {2,2}         36: {1,1,2,2}         19: {8}
   12: {1,1,2}       48: {1,1,1,1,2}       34: {1,7}
   16: {1,1,1,1}     64: {1,1,1,1,1,1}     39: {2,6}
   11: {5}           17: {7}               55: {3,5}
   14: {1,4}         26: {1,6}             49: {4,4}
   15: {2,3}         33: {2,5}             52: {1,1,6}
   20: {1,1,3}       35: {3,4}             66: {1,2,5}
   18: {1,2,2}       44: {1,1,5}           70: {1,3,4}
   24: {1,1,1,2}     42: {1,2,4}           63: {2,2,4}
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
This corresponds to the following tetrangle:
                  0
                 (1)
               (2)(11)
             (3)(21)(111)
        (4)(31)(22)(211)(1111)
  (5)(41)(32)(311)(221)(2111)(11111)
		

Crossrefs

Row lengths are A000041.
Ignoring length gives A129129.
Compositions under the same order are A296774 (triangle).
The dual version (sum/length/lex) is A334433.
The version for reversed partitions is A334435.
The constructive version is A334439 (triangle).
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.
Reverse-lexicographically ordered partitions are A080577.
Sorting reversed partitions by Heinz number gives A112798.
Graded lexicographically ordered partitions are A193073.
Partitions in colexicographic order (sum/colex) are A211992.
Graded Heinz numbers are given by A215366.
Sorting partitions by Heinz number gives A296150.

Programs

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

Formula

A001221(a(n)) = A103921(n).
A001222(a(n)) = A036043(n).

A334442 Irregular triangle whose reversed 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, 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
Offset: 0

Views

Author

Gus Wiseman, May 07 2020

Keywords

Comments

First differs from A036036 for reversed partitions of 9. Namely, this sequence has (2,2,5) before (1,4,4), while A036036 has (1,4,4) before (2,2,5).

Examples

			The sequence of all partitions begins:
  ()         (2,3)        (1,1,1,1,2)    (1,1,1,2,2)
  (1)        (1,1,3)      (1,1,1,1,1,1)  (1,1,1,1,1,2)
  (2)        (1,2,2)      (7)            (1,1,1,1,1,1,1)
  (1,1)      (1,1,1,2)    (1,6)          (8)
  (3)        (1,1,1,1,1)  (2,5)          (1,7)
  (1,2)      (6)          (3,4)          (2,6)
  (1,1,1)    (1,5)        (1,1,5)        (3,5)
  (4)        (2,4)        (1,2,4)        (4,4)
  (1,3)      (3,3)        (1,3,3)        (1,1,6)
  (2,2)      (1,1,4)      (2,2,3)        (1,2,5)
  (1,1,2)    (1,2,3)      (1,1,1,4)      (1,3,4)
  (1,1,1,1)  (2,2,2)      (1,1,2,3)      (2,2,4)
  (5)        (1,1,1,3)    (1,2,2,2)      (2,3,3)
  (1,4)      (1,1,2,2)    (1,1,1,1,3)    (1,1,1,5)
This sequence can also be interpreted as the following triangle:
                  0
                 (1)
               (2)(11)
             (3)(12)(111)
        (4)(13)(22)(112)(1111)
  (5)(14)(23)(113)(122)(1112)(11111)
Taking Heinz numbers (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

Row lengths are A036043.
The version for reversed partitions is A334301.
The version for colex instead of revlex is A334302.
Taking Heinz numbers gives A334438.
The version with rows reversed is A334439.
Ignoring length gives A335122.
Lexicographically ordered reversed partitions are A026791.
Reversed partitions in Abramowitz-Stegun (sum/length/lex) order are A036036.
Partitions in increasing-length colex order (sum/length/colex) are A036037.
Reverse-lexicographically ordered partitions are A080577.
Lexicographically ordered partitions are A193073.
Partitions in colexicographic order (sum/colex) are A211992.
Sorting partitions by Heinz number gives A296150.

Programs

  • Mathematica
    revlensort[f_,c_]:=If[Length[f]!=Length[c],Length[f]
    				
  • PARI
    A334442_row(n)=vecsort(partitions(n),p->concat(#p,-Vecrev(p))) \\ Rows of triangle defined in EXAMPLE (all partitions of n). Wrap into [Vec(p)|p<-...] to avoid "Vecsmall". - M. F. Hasler, May 14 2020

A334441 Maximum part of the n-th integer partition in Abramowitz-Stegun (sum/length/lex) order; a(0) = 0.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 06 2020

Keywords

Comments

First differs from A049085 at a(8) = 2, A049085(8) = 3.
The parts of a partition are read in the usual (weakly decreasing) order. The version for reversed (weakly increasing) partitions is A049085.

Examples

			Triangle begins:
  0
  1
  2 1
  3 2 1
  4 2 3 2 1
  5 3 4 2 3 2 1
  6 3 4 5 2 3 4 2 3 2 1
  7 4 5 6 3 3 4 5 2 3 4 2 3 2 1
  8 4 5 6 7 3 4 4 5 6 2 3 3 4 5 2 3 4 2 3 2 1
		

Crossrefs

Row lengths are A000041.
The length of the same partition is A036043.
Ignoring partition length (sum/lex) gives A036043 also.
The version for reversed partitions is A049085.
a(n) is the maximum element in row n of A334301.
The number of distinct parts in the same partition is A334440.
Lexicographically ordered reversed partitions are A026791.
Reversed partitions in Abramowitz-Stegun (sum/length/lex) order are A036036.
Partitions in increasing-length colex order (sum/length/colex) are A036037.
Graded reverse-lexicographically ordered partitions are A080577.
Partitions counted by sum and number of distinct parts are A116608.
Graded lexicographically ordered partitions are A193073.
Partitions in colexicographic order (sum/colex) are A211992.
Partitions in dual Abramowitz-Stegun (sum/length/revlex) order are A334439.

Programs

  • Mathematica
    Table[If[n==0,{0},Max/@Sort[IntegerPartitions[n]]],{n,0,10}]
Showing 1-10 of 26 results. Next