The arithmetics of octaves and of the group G2