Pyramid Calculation
CSS
body{
font-family: Helvetica, san-serif;
font-weight: 100;
font-size: 2em;
}
JavaScript
var maxInvites = 6;
var total = -4; // Start out 4 quarters in the hole.
total += 4 * maxInvites;
total += 3 * Math.pow(maxInvites, 2);
total += 2 * Math.pow(maxInvites, 3);
total += 1 * Math.pow(maxInvites, 4);
document.body.innerHTML += "$ " + .25 * total;