The order of books on a shelf is called wrong if no three adjacent books are arranged in order of height (either increasing or decreasing). How many wrong orders is it possible to construct from \(n\) books of different heights, if: a) \(n = 4\); b) \(n = 5\)?
Prove that if the irreducible rational fraction \(p/q\) is a root of the polynomial \(P (x)\) with integer coefficients, then \(P (x) = (qx - p) Q (x)\), where the polynomial \(Q (x)\) also has integer coefficients.
In the first term of the year Daniel received five grades in mathematics with each of them being on a scale of 1 to 5, and the most common grade among them was a 5 . In this case it turned out that the median of all his grades was 4, and the arithmetic mean was 3.8. What grades could Daniel have?
Sam and Lena have several chocolates, each weighing not more than 100 grams. No matter how they share these chocolates, one of them will have a total weight of chocolate that does not exceed 100 grams. What is the maximum total weight of all of the chocolates?