Problem

Source: Mathematics Regional Olympiad of Mexico West 2016 P1

Tags: algebra



Indra has a bag for bringing flowers for her grandmother. The first day she brings $n$ flowers. From the second day Indra tries to bring three times plus one with respect to the number of flowers of the previous day. However, if this number is greater or equal to $40$, Indra substracts multiples of $40$ until the remainder is less than this number, since her bag cannot containt so many flowers. For which value of $n$ Indra will bring $30$ flowers the day $2016$?