Cannot pair Playstation 3 controller to iMac
Are you're suggesting that you bought the controller used? If that is the case, are you sure that the battery isn't shot? Try leaving the USB cable plugged in and let the controller charge for a while. From my experience, if the battery is charged then pressing the PS button should at least blink something.

I have owned a PS3 only for the last year and rarely use it, but I have noticed that it only seems to charge when plugged into a PS3 as it doesn't seem to do much when plugged into an outlet that has USB charging ports on it (never tried an independent USB charging adapter).

If your battery is toast, I think you can find replacements on Amazon for several dollars. Documentation on the internet seems to indicate that replacing the PS3 controller battery is trivial for someone with basic electronics repair skills.