Algorithm · Square · Medium
You start with a single newly planted basil plant. A basil plant needs two weeks after it goes into the soil before it is mature. From the moment it is mature, a cutting is taken from it once every week, and each cutting is planted as a brand-new basil plant. Every new plant grown from a cutting obeys exactly the same rule: it also becomes mature two weeks after being planted, and from then on it also yields one cutting per week, which is planted in turn. Given the number of…