EDIT: My initial work missed an important mechanic. See my reply here for the corrected results.
When you purchase an aircraft, you can get a maximum 25% discount off the ticket price by buying in batches of 51 or more. On a $100,000,000 aircraft this means when you buy 50 of them you can get each plane for only $75,000,000. Not too shabby.
As the aircraft ages, it depreciates, which means it will be worth less if you choose to sell it later. However if you do not dispose of your aircraft, this isn't important, as depreciation is an unrealised loss until sale; if you never sell, you never actually take the hit.
Now, when you lease, you pay a fixed monthly price until you terminate the lease by either opting not to renew, terminating and paying a fee, or purchasing the aircraft from the lessor. This may seem like a sunk cost, especially when you realise that only 50% of the lease payments count towards the purchase price! So if over the life of the lease you pay $20,000,000 to the lessor, only $10,000,000 will apply as a "discount" on the sale price.
Here's the important bit, though: depreciation applies to planes that the lessor owns too! If the plane you lease depreciates at 10% per year, the price you buy it from the lessor for also decreases by 10% every year. This means, under the right circumstances, an aircraft can depreciate so much over the life of the lease that you can buy it from the lessor at a discount of 50% or more.
I'll spare you all the math that went on behind the scenes here, but I've made a few plots to demonstrate my point. Essentially any aircraft that depreciates at 12% per year or more will ultimately be cheaper to lease than to buy outright if you wait long enough. The number of months varies based on the actual depreciation rate, but in general, the faster the aircraft depreciates the sooner you can buy it at its maximum discount.
Note that this is the maximum discount re. best retail price. If you lease for too long the buyout price will go to $0, after which point you cannot get any more of a discount, so any lease payments you make will just disappear into the void.
All of this assumes optimal conditions, i.e. you get the best possible lease rate, and everything is compared to the best possible purchase price.
I'm happy to answer any questions!