Let $S$ is the set of permutation of {1,2,3,4,5,6,7,8} (1)For all $\sigma=\sigma_1\sigma_2...\sigma_8\in S$ Evaluate the sum of S=$\sigma_1\sigma_2+\sigma_3\sigma_4+\sigma_5\sigma_6+\sigma_7\sigma_8$. Then for all elements in $S$,what is the arithmetic mean of S? (Notice $S$ and S are different.) (2)In $S$, how many permutations are there which satisfies "For all $k=1,2,...,7$,the digit after k is not (k+1)"?
Problem
Source: 2020 Taiwan APMO Preliminary
Tags: Sets, set theory
23.07.2020 09:15
Ans:(1)78(2)16687 I know it seems confusing, but it's also confusing in Chinese, so if you know a better translation for this problem, please tell me.I'll be really apperciate. This is the original problem:
Attachments:

24.07.2020 16:01
$\sum_{1\le i<j\le 8}ij =\frac{1}{2}\left(\sum_{k=1}^8 k\right)^2-\frac{1}{2}\sum_{k=1}^8 k^2 =\frac{1}{2}\binom{9}{2}^2-\frac{1}{2}\left(\binom{9}{2}+2\binom{9}{3}\right)$ $=\frac{36^2-(36+168)}{2}=546$ $\frac{1}{8!}\sum_{\sigma\in S} (\sigma_1\sigma_2+\sigma_3\sigma_4+\sigma_5\sigma_6+\sigma_7\sigma_8) =\frac{4}{8!}\sum_{\sigma\in S}\sigma_1\sigma_2 =\frac{8}{8!}\sum_{\sigma_1<\sigma_2\atop \sigma\in S}\sigma_1\sigma_2$ $=\frac{8\times 6!}{8!}\sum_{1\le i<j\le 8}ij=\frac{8\times 6!\times 546}{8!}=78$
24.07.2020 17:35
https://oeis.org/A000255 I see the recurrence of the series is $a_n=na_{n-1}+(n-1)a_{n-2}$ Let's consider a permutation of $\{1,2,\dots,n,n+1\}$ that doesn't have "k,k+1" If the permutation has no "k,n+1,k+1" after taking out "n+1" from the permutation it becomes a permutation of $\{1,2,\dots,n\}$ that doesn't have "k,k+1" There are n+1 holes to plug back "n+1" into a permutation of $\{1,2,\dots,n\}$ but one of them is after "n" Totally $na_{n-1}$ permutation works in this way If the permutation has "k,n+1,k+1" it can be "1,n+1,2", "2,n+1,3",..., "n-1,n+1,n" there are no "k,n+1,k+1" after "k-1" similarly there are no "k+2" after "k,n+1,k+1" regard "k,n+1,k+1" as "k", "k+2" as "k+1", ..., "n" as "n-1" it becomes a permutation of $\{1,2,\dots,n-1\}$ that doesn't have "k,k+1" Totally $(n-1)a_{n-2}$ permutation works in this way