The math on page 12 is correct. In a raffle the winner isn't revealed until tickets stop being sold. Your model seems to assume that you can stop buying once you buy a winning ticket, but that's impossible.
There's also a different mistake in your model. The P_n that you calculate are not the...