A company is planning a way to reward customers for inviting their friends.
They're planning a reward system that will give a customer points for each confirmed invitation they played a part into.
The definition of a confirmed invitation is one where another invitation's invitee invited someone.
The inviter gets (1/2)^k points for each confirmed invitation, where k is the level of the invitation:
- level 0 (people directly invited) yields 1 point
- level 1 (people invited by someone invited by the original customer) gives 1/2 points
- level 2 invitations (people invited by someone on level 1) awards 1/4 points and so on