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!)
A102417 In the lexically ordered table of order n, there are two entries that give the greatest sum of pairwise products and they are reversals of each other. The items in this sequence are the indices of the earlier of the two. 0
0, 1, 3, 11, 41, 191, 1055, 6959, 53159, 462239, 4499999, 48454559, 571409999, 7321386239, 101249648639, 1502852279039, 23827244757119, 401839065331199, 7182224591270400, 135607710526041600, 2696935204633823744 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,3

COMMENTS

The sequence of maximum sums, for which those here are the indices, is given by A101986. The formula d2 below yields n! if n is odd and n! - (n/2)! for even n. The formula for a(n) is essentially an inner product. For example, if n is 7, the result is obtained by (7 6 5 4 3 2 1) ip d2 (1 2 3 4 5 6 7) that is, (7 6 5 4 3 2 1) ip (1 1 6 22 120 714 5040) or 6959.

Changing the offset to 1 would change the sequence so that it gives the greater of the two indices of the rows that yield the maximum sum of products, but for permutations one shorter in length. For example, with offset 2, index 3 is the index of the earlier row having the permutation giving maximum value for permutations of length 4; with offset 1, index 3 is the later index for the permutation giving maximum value for permutations of length 3. Etc. - Eugene McDonnell (eemcd(AT)mac.com), Feb 23 2005

LINKS

Table of n, a(n) for n=2..22.

FORMULA

In PARI code: { a(n) = sum(k=1, n, (n+1-k)*d2(k)) } { d2(n) = if(n%2, n!, n!-(n/2)!) } (* I owe this to Max Alekseyev *)

EXAMPLE

The 6959th entry in the table of permutations of order 9 is

1 3 5 7 9 8 6 4 2 which has the pairwise products 3 15 35 63 72 48 24 8; these sum to 268 and this is the ninth entry in A101986.

CROSSREFS

Sequence in context: A149066 A149067 A018962 * A096147 A225431 A099489

Adjacent sequences:  A102414 A102415 A102416 * A102418 A102419 A102420

KEYWORD

easy,nonn

AUTHOR

Eugene McDonnell (eemcd(AT)mac.com), Feb 23 2005

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 February 28 05:46 EST 2020. Contains 332321 sequences. (Running on oeis4.)