You have the right idea, but you got the formula wrong. That's evidenced in the source you link, but you can also reason it from first principles: a higher discount rate should make the cash stream less valuable, not more. The correct formula is n / d.