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.

A322761 Irregular triangle read by rows in which n-th row lists all partitions of n, in graded reverse lexicographic ordering, using a compressed notation.

Original entry on oeis.org

1, 2, 11, 3, 21, 111, 4, 31, 22, 211, 1111, 5, 41, 32, 311, 221, 2111, 11111, 6, 51, 42, 411, 33, 321, 3111, 222, 2211, 21111, 111111, 7, 61, 52, 511, 43, 421, 4111, 331, 322, 3211, 31111, 2221, 22111, 211111, 1111111
Offset: 1

Views

Author

N. J. A. Sloane, Dec 30 2018

Keywords

Comments

Officially this is deprecated, since one cannot distinguish between (for example) parts which are 11 and parts which are 1,1. However, it is in common use and is included for completeness. See A036037, A080577, etc., for uncompressed versions.

Examples

			Triangle begins:
1,
2, 11,
3, 21, 111,
4, 31, 22, 211, 1111,
5, 41, 32, 311, 221, 2111, 11111,
6, 51, 42, 411, 33, 321, 3111, 222, 2211, 21111, 111111,
7, 61, 52, 511, 43, 421, 4111, 331, 322, 3211, 31111, 2221, 22111, 211111, 1111111,
...
...
		

Crossrefs

Cf. A000041 (number of terms in row n), A036037, A080577.
See also A006128.
First column gives A000027.
Last elements of rows give A000042.

Programs

  • Maple
    b:= (n, i)-> `if`(n=0 or i=1, [cat(1$n)], [map(x->
        cat(i, x), b(n-i, min(n-i, i)))[], b(n, i-1)[]]):
    T:= n-> map(parse, b(n$2))[]:
    seq(T(n), n=1..10);  # Alois P. Heinz, Dec 30 2018
  • Mathematica
    revlexsort[f_, c_] := OrderedQ[PadRight[{c, f}]];
    Table[FromDigits /@ Sort[IntegerPartitions[n], revlexsort], {n, 1, 8}] // Flatten (* Jean-François Alcover, Oct 20 2020, after Gus Wiseman in A080577 *)