login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A180879 Number of permutations p() of 1..n+2 with centered difference p(i+1)-p(i-1) < 0 exactly once 1
3, 12, 50, 160, 525, 1540, 4662, 13104, 38346, 105336, 303732, 823680, 2361645, 6357780, 18208190, 48814480, 139952670, 374315656, 1075431084, 2872519104, 8273365282, 22082137896, 63760878300, 170112213600, 492371090100 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Column 2 of A180887

LINKS

R. H. Hardin, Table of n, a(n) for n=1..100

PROG

/* bc , formula r(n, k) from A000892 */

define factorial(n) {

auto prod;

prod=1;

while(n>=2)prod*=n--;

return prod;

}

define binomial(n, i) {

if(i<0||i>n)return 0;

return factorial(n)/(factorial(i)*factorial(n-i));

}

define r(n, k) {

auto j, sum;

sum=0;

for(j=0; j<=k+1; j++) {

sum+=(-1)^j*(k+1-j)^n*binomial(n+1, j);

}

return sum;

}

define t(n, k) {

auto sum, i;

sum=0;

for(i=0; i<=(k-1); i++)sum+=r((n+k)/2, i)*r((n+k)-(n+k)/2, (k-1)-i);

return sum*binomial((n+k), (n+k)/2);

}

for(n=1; n<=100; n++) {

print n, " ", t(n, 2), "\n";

}

quit

CROSSREFS

Sequence in context: A002179 A224659 A034541 * A180283 A037765 A037653

Adjacent sequences:  A180876 A180877 A180878 * A180880 A180881 A180882

KEYWORD

nonn

AUTHOR

R. H. Hardin Sep 23 2010

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 January 24 22:45 EST 2022. Contains 350565 sequences. (Running on oeis4.)