I'm trying to find a formula for

copy[3] = b.data[0]

copy[4] = b.data[1]

copy[5] = b.data[2]

copy[9] = b.data[3]

copy[10] = b.data[4]

copy[11] = b.data[5]

letting the right hand side be b.data*, I can see this is like*

copy[3] = b.data[0] multiply by 2, add 3

copy[4] = b.data[1] multiply by 2, add 2

copy[5] = b.data[2] multiply by 2, add 1

copy[9] = b.data[3] multiply by 2, add 3

copy[10] = b.data[4] multiply by 2, add 2

copy[11] = b.data[5] multiply by 2, add 1

there's obviously a modulo pattern going on so I've tried

copy[i*2 + (rows +(-1*i) % (rows + 1))] = b.data_*;*

(rows = 3)

which gives me the adding pattern 3 2 1 0 3 2 1 0

however I need to miss out the 0, can anyone see how to do this?

Thanks in advance!

*Edited
by sexyzebra19*: n/a