# Find groups of three

I am trying to come up with an equation that describes groups of three. I have one limitation though, which is that I have to use an ever increasing value of n + 1 for each iteration. Not sure if this is possible.

So for example:

when n = x : result y

n = 1 : 1  (first set of three)
n = 2 : 2
n = 3 : 3
................................
n = 4 : 7  (second set of three)
n = 5 : 8
n = 6 : 9
................................
n = 7 : 13  (continues...)


The limitation is for a computer program that selects rows. I can provide it with an equation that consists of one variable, n. I would really appreciate not just an answer, but a short explanation of how to tackle it.

-
@RossMillikan - yes, that is exactly it. Sorry if it wasn't clear. – mrtsherman Nov 16 '11 at 2:54

Do you want to skip three between groups? The first group would be 1,2,3, skip 4,5,6, second group 7,8,9, skip 10,11,12, third group 13,14,15 and so on? If so you have $3\lfloor\frac{n-1}{3}\rfloor+n$