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!)
A180884 Number of permutations p() of 1..n+7 with centered difference p(i+1)-p(i-1) < 0 exactly 6 times 1

%I #3 Mar 31 2012 12:35:48

%S 70,4662,203616,5517204,116189304,1997701992,29868078240,398942612640,

%T 4892905415970,55931879316170,604691896711760,6237809698157180,

%U 61935775158718032,595207094582803248,5567411131221296448

%N Number of permutations p() of 1..n+7 with centered difference p(i+1)-p(i-1) < 0 exactly 6 times

%C Column 7 of A180887

%H R. H. Hardin, <a href="/A180884/b180884.txt">Table of n, a(n) for n=1..100</a>

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

%o define factorial(n) {

%o auto prod;

%o prod=1;

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

%o return prod;

%o }

%o define binomial(n,i) {

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

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

%o }

%o define r(n,k) {

%o auto j,sum;

%o sum=0;

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

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

%o }

%o return sum;

%o }

%o define t(n,k) {

%o auto sum,i;

%o sum=0;

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

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

%o }

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

%o print n, " ", t(n,7), "\n";

%o }

%o quit

%K nonn

%O 1,1

%A _R. H. Hardin_ Sep 23 2010

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)