[seqfan] Re: Permutations: sum of max of each adjacent pair

Max Alekseyev maxale at gmail.com
Thu Aug 12 14:52:04 CEST 2010


On Wed, Aug 11, 2010 at 7:47 PM, Ron Hardin <rhhardin at att.net> wrote:

> 2,2,8,12,72,144,1152,2880,28800,86400,1036800,3628800,50803200,
> 203212800,3251404800
> Number of permutations of 0..(n-1) with the sum of the maximum of each adjacent
> pair = n*(n-1)/2 + floor((n-1)^2/4)

For odd n,
a(n) = ((n-1)/2)! * ((n+1)/2)!

For even n,
a(n) = 2 * (n/2)!^2

I would prepend the a(1)=1 (when there are no adjacent pairs and the
sum is 0) such that the sequence becomes:
1, 2, 2, 8, 12, 72, 144, 1152, 2880, 28800, 86400, 1036800, 3628800,
50803200, 203212800, 3251404800, 14631321600, 263363788800,
1316818944000, 26336378880000, 144850083840000, 3186701844480000,
19120211066880000, 458885065605120000, 2982752926433280000,
77551576087265280000, 542861032610856960000, 15200108913103994880000,
114000816848279961600000, 3420024505448398848000000,
27360196043587190784000000, 875526273394790105088000000,
7441973323855715893248000000

Regards,
Max




More information about the SeqFan mailing list