login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A304001 Number of permutations of [n] whose up-down signature has a nonnegative total sum. 2
1, 1, 1, 5, 12, 93, 360, 3728, 20160, 259535, 1814400, 27820524, 239500800, 4251096402, 43589145600, 877606592736, 10461394944000, 235288904377275, 3201186852864000, 79476406782222500, 1216451004088320000, 33020655481590446318, 562000363888803840000 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

The up-down signature has (+1) for each ascent and (-1) for each descent.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..450

MAPLE

b:= proc(u, o, t) option remember; (n->

     `if`(t>=n, n!, `if`(t<-n, 0,

      add(b(u-j, o+j-1, t-1), j=1..u)+

      add(b(u+j-1, o-j, t+1), j=1..o))))(u+o)

    end:

a:= n-> `if`(n=0, 1, add(b(j-1, n-j, 0), j=1..n)):

seq(a(n), n=0..25);

# second Maple program:

a:= n-> `if`(irem(n, 2, 'r')=0, ceil(n!/2),

         add(combinat[eulerian1](n, j), j=0..r)):

seq(a(n), n=0..25);

CROSSREFS

Bisections give: A002674 (even part), A179457(2n+1,n+1) (odd part).

Cf. A000246 (for nonnegative partial sums), A006551 (total sums are 0 or 1), A008292, A303287.

Sequence in context: A249478 A009414 A009426 * A009731 A009427 A267271

Adjacent sequences:  A303998 A303999 A304000 * A304002 A304003 A304004

KEYWORD

nonn

AUTHOR

Alois P. Heinz, May 04 2018

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 30 17:47 EDT 2020. Contains 333127 sequences. (Running on oeis4.)