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

A318354 Triangle read by rows: T(n,k) is the number of permutations p of {1..n} such that p(1)=k and p(i+1) < p(i) iff a strict majority of {1..n} \ {p(1)..p(i)} are < p(i).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 5, 3, 3, 5, 16, 11, 8, 11, 16, 62, 46, 35, 35, 46, 62, 286, 224, 178, 143, 178, 224, 286, 1519, 1233, 1009, 831, 831, 1009, 1233, 1519, 9184, 7665, 6432, 5423, 4592, 5423, 6432, 7665, 9184, 62000, 52816, 45151, 38719, 33296, 33296, 38719, 45151, 52816, 62000
Offset: 1

Views

Author

Glen Whitney, Aug 24 2018

Keywords

Comments

If you shuffle n cards numbered 1 to n and then turn them over one at a time, guessing whether the next will be larger than the previous by the (optimal) rule that you guess "larger" unless there are more cards remaining smaller than the one just revealed, T(n,k) is the number of arrangements such that the first card revealed is k and you guess correctly every time.

Examples

			Suppose you are playing with four cards and you initially turn over a "2". You guess "larger" because there are two larger cards, 3 and 4, remaining, and only 1 smaller card, 1, remaining. You continue playing in this way, guessing larger unless there are (strictly) more smaller cards remaining. You guess correctly every time if the order of the cards was 2,3,4,1; 2,4,3,1; or 2,4,1,3. Thus T(4,2) = 3.
The triangle begins:
        1
       1 1
      2 1 2
     5 3 3 5
  16 11 8 11 16
62 46 35 35 46 62
		

Crossrefs

T(n+1,1) = A144188(n).

Formula

For k <= n/2 + 1: T(n+1,k) = Sum_{i=k..n} T(n,i);
For k >= n/2 + 1: T(n+1,k) = Sum_{i=1..k-1} T(n,i).
T(n+1,k+1) = f(n,k), where f(n,k) is the auxiliary function defined in the formula for A144188.
Showing 1-1 of 1 results.