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.

User: Peter Doyle

Peter Doyle's wiki page.

Peter Doyle has authored 2 sequences.

A216040 Number of permutations sortable using two parallel stacks.

Original entry on oeis.org

1, 1, 2, 6, 23, 103, 513, 2760, 15741, 93944, 581303, 3704045, 24180340, 161082639, 1091681427, 7508269793, 52302594344, 368422746908, 2620789110712, 18806093326963, 136000505625886, 990406677136685, 7258100272108212
Offset: 0

Author

Peter Doyle, Aug 30 2012

Keywords

Examples

			Up to n = 4, the only permutation that can't be sorted is 2341. This fails because after moving 2 to one stack, you must move 3 to the other stack, and now the 4 will block either the 2 or the 3. (If you use a double-ended queue instead of two stacks, then this permutation becomes sortable; cf. A182216.)
		

Crossrefs

Extensions

a(0)=1 added by N. J. A. Sloane, Sep 12 2012

A101842 Triangle read by rows: T(n,k), for k=-n..n-1, is the scaled (by 2^n n!) probability that the sum of n uniform [-1, 1] variables is between k and k+1.

Original entry on oeis.org

1, 1, 1, 3, 3, 1, 1, 7, 16, 16, 7, 1, 1, 15, 61, 115, 115, 61, 15, 1, 1, 31, 206, 626, 1056, 1056, 626, 206, 31, 1, 1, 63, 659, 2989, 7554, 11774, 11774, 7554, 2989, 659, 63, 1, 1, 127, 2052, 13308, 47349, 105099, 154624, 154624, 105099, 47349, 13308, 2052, 127, 1, 1, 255, 6297, 56935, 274677
Offset: 1

Author

David Applegate, based on Peter Doyle's talk, Jun 10 2007

Keywords

Comments

Equivalently, T(n,k)/n! is the n-dimensional volume of the portion of the n-dimensional hypercube [-1,1]^n cut by the (n-1)-dimensional hyperplanes x_1 + x_2 + ... x_n = k, x_1 + x_2 + ... x_n = k+1.
The analogous triangle for the interval [0,1] is that of the Eulerian numbers, A008292.
This is the distribution of the flag-descent (fdes) statistic in signed permutations, as introduced by Adin, Brenti, Roichman. The link between fdes and portions of hypercubes follows an argument adapted from Stanley. [Matthieu Josuat-Vergès, Apr 25 2011]
T(n,n) = A011818(n), the normalized volume of center slice of n-dimensional cube. - Paul D. Hanna, Jan 03 2017

Examples

			Triangle of T(n,k), k=-n..n-1 begins:
                              1, 1
                           1, 3, 3, 1
                       1, 7, 16, 16, 7, 1
                 1, 15, 61, 115, 115, 61, 15, 1
          1, 31, 206, 626, 1056, 1056, 626, 206, 31, 1
  1, 63, 659, 2989, 7554, 11774, 11774, 7554, 2989, 659, 63, 1
The sequence of polynomials starts:
  p(0, x) =   1
  p(1, x) =   x +  1
  p(2, x) = x^3 +  3*x^2 +  3*x   +   1
  p(3, x) = x^5 +  7*x^4 + 16*x^3 +  16*x^2 +   7*x   +  1
  p(4, x) = x^7 + 15*x^6 + 61*x^5 + 115*x^4 + 115*x^3 + 61*x^2 + 15*x + 1
		

References

  • Peter Doyle, Myths about card shuffling, talk given at DIMACS Workshop on Puzzling Mathematics and Mathematical Puzzles: a Gathering in Honor of Peter Winkler's 60th Birthday, Rutgers University, Jun 08, 2007

Crossrefs

See also A008292 (Eulerian numbers).

Programs

  • Maple
    gf := (1 - x)/(exp((x + 1)*z) - x): ser := series(gf, z, 12):
    for n from 0 to 6 do p := simplify(n!*(x - 1)^n*coeff(ser,z, n));
    print(PolynomialTools:-CoefficientList(p, x)) od: # Peter Luschny, Jun 24 2019
  • Mathematica
    T[n_, k_] /; -n <= k <= n-1 := T[n, k] = (n-k) T[n-1, k-1] + T[n-1, k] + (n+k+1) T[n-1, k+1]; T[1, -1] = T[1, 0] = 1; T[, ] = 0;
    Table[T[n, k], {n, 1, 8}, {k, -n, n-1}] (* Jean-François Alcover, Jun 27 2019 *)
  • PARI
    {T(n,k) = polcoeff( n!*polcoeff( -1 + (1-y) / (1 - y*exp( (1-y^2)*x +x*O(x^n) )) ,n,x),k,y)}
    for(n=1,10,for(k=1,2*n,print1(T(n,k),", "));print("")) \\ Paul D. Hanna, Jan 03 2017

Formula

T(n,k) = (n-k) * T(n-1,k-1) + T(n-1,k) + (n+k+1)*T(n-1,k+1).
With the column index k starting at 0 the table entries appear to be given by t(n,k) = Sum_{i = 0..k} A173018(n,i)*binomial(n,k-i), n >= 1. - Peter Bala, Jul 17 2012
E.g.f.: -1 + (1-y) / (1 - y*exp( (1-y^2)*x )). - Paul D. Hanna, Jan 03 2017
p(n, x) = n! * (x - 1)^n * [z^n] (1 - x)/(exp((x + 1)*z) - x) defines a sequence of polynomials. p(n, x) = (x + 1)^n*A(n, x) where A(n, x) are the Eulerian polynomials as defined by A008292. The coefficients of these polynomials are the T(n, k) if enumerated for n >= 0 and 0 <= k <= 2*n - 1 if n > 0 and T(0,0) = 1. - Peter Luschny, Jun 24 2019

Extensions

Terms a(57) and beyond from Paul D. Hanna, Jan 03 2017