i have recently had problems with my mac on startup. formatted it twice.

it finally started working properly , unitl today! turned it off properly yesterday, turned off the power point afterwards and awoke this morning only to find when i turned on the power it did not start. The screen stayed black and the power indicator (l.e.d) to the right hand side of the front of the imac ( underneath the skin) started to flash. the only other time i have seen this, is when the RAM is removed... but the RAM is fine and secure. any other theories or help?