<s>[INST] How to put numbers $1$ to $8$ in a row that every number shouldn't be bigger than the sum of numbers next to it? How to put numbers $1$ to $8$ in a row that every number shouldn't be bigger than the sum of numbers next to it?
My attempt: I tried to put numbers from left to right and count the ways but it was to hard and didn't give the answer.Any hints(not answers).
 [/INST] Suppose that the first three numbers satisfy the condition, but the whole seqence does not.
Since $1+2+3+4>8$ we must necessarily have $a_4>a_1+a_2+a_3$.
Case $1: a_4=7$, in this case we must have that $a_1,a_2,a_3$ are a permutation of $1,2,3$. So there are $3!\times 4!$ counterexamples of this form.
Case $2: a_4=8$, In this case we can have that $a_1,a_2,a_3$ are a permutation of $1,2,3$ or $1,2,4$. In total there are $2\times 3!\times 4!$ counterexamples.

So how many permutations satisfy that $a_1>a_2$ and $a_1+a_2>a_3$. Since clearly the two conditions are independent we must only count the triples $(a_1,a_2,a_3)$ with $a_1>a_2$ with $a_1+a_2<a_3$.
They can be enumerated rather quickly:
$(1,a,k)$ gives $5+4+3+2+1=15$ solutions.
$(2,a,k)$ gives $3+2+1=6$ solutions.
$(3,a,k)$ gives $1$ solution.
So there are $22$ solutions.
This means that there are $\frac{8\times 7 \times 6 - 2\times 22}{2}$ triples that satisfy $a_1<a_2$ and $a_1+a_2\geq a_3$. So our final answer is: 
$$\frac{8\times 7 \times 6 - 2\times 22}{2}\times 5!-3\times 3!\times 4!$$
</s>