The multidimensional cube recurrence