Periodic representations for cubic irrationalities