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.

A143381 Number of Hi-Lo arrangements HL(m,n) of a deck with n suits and m ranks in each suit, m>=1, n>=1.

This page as a plain text file.
%I A143381 #10 Feb 03 2015 14:20:59
%S A143381 0,2,0,6,2,0,14,30,2,0,78,230,174,2,0,230,14094,4834,1092,2,0,1902,
%T A143381 187106,3785126,114442,7188,2,0,6902,26185806,250560122,1225289412,
%U A143381 2908990,48852,2,0,76110,557115782,682502468094,423419180642
%N A143381 Number of Hi-Lo arrangements HL(m,n) of a deck with n suits and m ranks in each suit, m>=1, n>=1.
%C A143381 In High-Low card game, a card is turned over (from the top of a regular shuffled 52-card deck) and the player is asked to guess if the next card will be higher or lower than the one shown. A simple strategy to play the game would be to guess 'High' if the card is an Ace through 6 (consider Ace to be of rank 1), 'Low' if the card is 8 through 13 (King) and flip a coin if the card is a 7. Intuitively, the player is playing the best he can without memory. If we make the assumption that the player always gets the random coin flips correct, then the probability that he will get every turn correct through the entire deck equals HL(13,4)*4!^13/52! (~= 1.7*10^(-7)) where HL(m,n) is defined below.
%C A143381 Given a deck with n suits each ranked from 1 to m (for a total of mn cards in the deck), a Hi-Lo arrangement of the cards is an arrangement of ranks r(1),r(2),...,r(mn) that satisfies the following three properties: (i) if r(i) < (m+1)/2 then r(i+1) > r(i); (ii) if r(i) > (m+1)/2 then r(i+1) < r(i); and (iii) if r(i) = (m+1)/2 then r(i+1) is different from r(i). The number of Hi-Lo arrangements of a deck with m ranks and n suits is denoted HL(m,n).
%H A143381 Max Alekseyev, <a href="http://home.gwu.edu/~maxal/gpscripts/">PARI scripts for various problems</a>
%H A143381 Kipli's Cage: <a href="https://web.archive.org/web/20070811194657/http://kipliscage.powerblogs.com/posts/1143090752.shtml">Enumerating HiLo arrangements</a> (the definition there has some glitches - see correct version in this entry).
%e A143381 The table of values HL(m,n) starts:
%e A143381 0 0 0 0 0 0 0 ...
%e A143381 2 2 2 2 2 2 2 ...
%e A143381 6 30 174 1092 7188 48852 339720 ...
%e A143381 14 230 4834 114442 2908990 77538470 2138286650 ...
%e A143381 78 14094 3785126 1225289412 442227602892 171398421245988 69859403814893544 ...
%e A143381 ...
%o A143381 (PARI) \r nseqadj.gp
%o A143381 { f(m,n,k) = sum(j=0, k, (-1)^j * binomial(k,j) * binomial(k-j,n)^m ) }
%o A143381 { HL0(m,n) = 2 * sum(k=n, (m/2)*n, f(m/2,n,k) * (f(m/2,n,k) + f(m/2,n,k+1)) ) } \\ for even m
%o A143381 { HL1(m,n) = sum(i=n, (m\2)*n, f(m\2,n,i) * sum(j=n, (m\2)*n, f(m\2,n,j) * M([n,i,j]) )) } \\ for odd m
%o A143381 { HL(m,n) = if(m%2, HL1(m,n), HL0(m,n) ) }
%Y A143381 Rows: A000004, A007395, A110706. Bisection of the first column: HL(2m, 1) = A048163(m+1).
%K A143381 nonn,tabl
%O A143381 1,2
%A A143381 _Max Alekseyev_, Aug 11 2008, Aug 17 2008