Problem

Source: Bundeswettbewerb Mathematik 2018, Round 1 - #1

Tags: Digits, number theory, arithmetic



Find the largest positive integer with the property that each digit apart from the first and the last one is smaller than the arithmetic mean of her neighbours.