% modulo help needed

I was looking for a way to make put a menu like…

Item1 Item4 Item 5 Item 6
Item2
Item3

If i look 2 the modulo i can create it like

1 3 5
2 4 6
item._x = Math.floor(i/2)150;
item._y = starty+30
(i%2);

or

1 4
2 5
3 6
item._x = Math.floor(i/3)150;
item._y = starty+30
(i%3);

==============================
Some one with a solution ?