I would guess youYou are hitting overflow with 32 bit "integers" at around the point where things stop off in your calculations. In other words, your graph stops being accurate because you are using machine numeric types which only store 32 bits, not the full number.