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-5 of 5 results.

A124736 Table where row n has k C(n,k-1) times.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			The table starts:
1
1 2
1 2 2 3
1 2 2 2 3 3 3 4
		

Crossrefs

Cf. A124737, A124748, A000079 (row lengths), A001792 (row sums), A007318.

Formula

a(n) = A124737(n) + 1

A296772 Triangle read by rows in which row n lists the compositions of n ordered first by decreasing length and then reverse-lexicographically.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 20 2017

Keywords

Comments

The ordering of compositions in each row is consistent with the reverse-Mathematica ordering of expressions (cf. A124734).
Length of k-th composition is A124748(k-1)+1. - Andrey Zabolotskiy, Dec 20 2017

Examples

			Triangle of compositions begins:
(1),
(11),(2),
(111),(21),(12),(3),
(1111),(211),(121),(112),(31),(22),(13),(4),
(11111),(2111),(1211),(1121),(1112),(311),(221),(212),(131),(122),(113),(41),(32),(23),(14),(5).
		

Crossrefs

Programs

  • Mathematica
    Table[Reverse[Sort[Join@@Permutations/@IntegerPartitions[n]]],{n,6}]

A108244 Triangle read by rows: row n gives list of all compositions of n ordered first by decreasing length, then by reverse colexicographical order.

Original entry on oeis.org

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

Views

Author

Hugo van der Sanden, Jun 20 2005

Keywords

Comments

An example of a sequence which contains all finite sequences of positive integers as subsequences.
From Andrey Zabolotskiy, May 18 2018: (Start)
At first, the ordering within the compositions of fixed length coincides with the lexicographical order (which is the case of A228369), but for n = 5 the partitions {2, 1, 2}, {1, 3, 1}, {2, 2, 1} go in this order because the order becomes reverse lexicographical when they are reversed (read right-to-left): {2, 1, 2}, {1, 3, 1}, {1, 2, 2}.
Length of k-th composition is A124748(k-1)+1.
Reversing every composition gives A296772. (End)

Examples

			The first 5 rows are:
{1}
{1, 1}, {2}
{1, 1, 1}, {1, 2}, {2, 1}, {3}
{1, 1, 1, 1}, {1, 1, 2}, {1, 2, 1}, {2, 1, 1}, {1, 3}, {2, 2}, {3, 1}, {4}
{1, 1, 1, 1, 1}, {1, 1, 1, 2}, {1, 1, 2, 1}, {1, 2, 1, 1}, {2, 1, 1, 1}, {1, 1, 3}, {1, 2, 2}, {2, 1, 2}, {1, 3, 1}, {2, 2, 1}, {3, 1, 1}, {1, 4}, {2, 3}, {3, 2}, {4, 1}, {5}
		

Crossrefs

Triangles of compositions: A066099 (main entry for compositions; similar to the Mathematica ordering for partitions, A080577), A124734 (similar to the Abramowitz & Stegun ordering for partitions, A036036), and this sequence (similar to the Maple partition ordering, A080576), A296772.

Programs

  • Mathematica
    Flatten[ Table[ Reverse[ # ] & /@ Reverse[ Sort[ Flatten[ Permutations[ # ] & /@ Partitions[ n], 1]]], {n, 6}]] (* Robert G. Wilson v, Jun 22 2005 *)

Extensions

More terms from Robert G. Wilson v, Jun 22 2005
Name corrected by Andrey Zabolotskiy, May 18 2018

A124735 Table with all sequences of nonnegative integers sorted first by total plus length, then by length and finally lexicographically.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This can be regarded as a table in two ways: with each weak composition as a row, or with the weak compositions of each integer as a row. The first way has A124736 as row lengths and A124748 as row sums; the second has A001792 as row lengths and A001787 as row sums.
This sequence includes every finite sequence of nonnegative integers.

Examples

			The table starts:
0
1; 0 0
2; 0 1; 1 0; 0 0 0
		

Crossrefs

Formula

a(n) = A124734(n) - 1.

A124737 Table where row n has k C(n,k) times.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			The table starts:
0
0 1
0 1 1 2
0 1 1 1 2 2 2 3
		

Crossrefs

Cf. A124736, A124748, A000079 (row lengths), A001787 (row sums), A007318.
Showing 1-5 of 5 results.