Doh! You're right, I forgot the "everyone else" part.

I think this would have done it:

`assign("r20", floor((n - 9) * .2))`

assign("r30", floor((n - 9) * .3))

if(r < 10, ((9 - r) * 2.5) + 15 + switch(r, 1, 15, 2, 5), if((r > 9) and (r <= (9 + r20)), 10, if((r > (9 + r20)) and (r <= (9 + r20 + r30)), 5**, 2.5**)))