I have the below value, in A1. When i drag down this should increment in such a way as shown below. B should increment first, keeping C constant. Once B reaches maximum value, which is 2, then C should increment. The maximum value for C actually depends on the row number, rownumber divided by 2 or rownumber divided by 2 rounded to next integer.

We are trying to use excel fucctionalities to generate such a series of pattern for the some use.
If you have a lot of these, you can save some calculations by having two slightly different formulas in the first two rows, and then you can copy and paste both of them together over many rows: