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.
%I A318354 #12 Sep 08 2018 16:53:35 %S A318354 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, %T A318354 178,224,286,1519,1233,1009,831,831,1009,1233,1519,9184,7665,6432, %U A318354 5423,4592,5423,6432,7665,9184,62000,52816,45151,38719,33296,33296,38719,45151,52816,62000 %N 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). %C A318354 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. %H A318354 Alois P. Heinz, <a href="/A318354/b318354.txt">Rows n = 1..141, flattened</a> %H A318354 The Riddler Express, O. Roeder, <a href="https://fivethirtyeight.com/features/how-many-hoops-will-kids-jump-through-to-play-rock-paper-scissors/">solution to 2018-Aug 17 problem by K. Hudson</a> %F A318354 For k <= n/2 + 1: T(n+1,k) = Sum_{i=k..n} T(n,i); %F A318354 For k >= n/2 + 1: T(n+1,k) = Sum_{i=1..k-1} T(n,i). %F A318354 T(n+1,k+1) = f(n,k), where f(n,k) is the auxiliary function defined in the formula for A144188. %e A318354 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. %e A318354 The triangle begins: %e A318354 1 %e A318354 1 1 %e A318354 2 1 2 %e A318354 5 3 3 5 %e A318354 16 11 8 11 16 %e A318354 62 46 35 35 46 62 %Y A318354 T(n+1,1) = A144188(n). %K A318354 nonn,tabl %O A318354 1,4 %A A318354 _Glen Whitney_, Aug 24 2018