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.

A246688 Triangle in which n-th row lists lexicographically ordered increasing lists of parts of all partitions of n into distinct parts.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Sep 01 2014

Keywords

Examples

			Triangle begins:
  [1];
  [2];
  [1,2], [3];
  [1,3], [4];
  [1,4], [2,3], [5];
  [1,2,3], [1,5], [2,4], [6];
  [1,2,4], [1,6], [2,5], [3,4], [7];
  [1,2,5], [1,3,4], [1,7], [2,6], [3,5], [8];
  [1,2,6], [1,3,5], [1,8], [2,3,4], [2,7], [3,6], [4,5], [9];
  [1,2,3,4], [1,2,7], [1,3,6], [1,4,5], [1,9], [2,3,5], [2,8], [3,7], [4,6], [10];
		

Crossrefs

Row lengths are A015723.
Row sums give A066189.
Last elements of rows are A000027.

Programs

  • Maple
    b:= proc(n, i) b(n, i):= `if`(n=0, [[]], `if`(i>n, [],
          [map(x->[i, x[]], b(n-i, i+1))[], b(n, i+1)[]]))
        end:
    T:= n-> map(x-> x[], b(n, 1))[]:
    seq(T(n), n=1..12);
  • Mathematica
    T[n_] := Module[{ip, lg}, ip = Reverse /@ Select[ IntegerPartitions[n], # == DeleteDuplicates[#]&]; lg = Length /@ ip // Max; SortBy[PadRight[#, lg]&][ip]];
    Table[T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Oct 21 2022 *)