# Any concise way to represent this in a formula?

I'm doing a presentation and I have to include this in it:

for j in 1..j_max
b_offset = copy(b)
b_offset[j] = b_offset[j] + 1


I can't do b_offset = b + 1, but I don't know how else to describe that just the jth index should increase by one.

• Just keep in mind that if you are too concise you risk confusing your audience. – chazisop Apr 13 '11 at 3:51
• I'll explain what it means too. – user9525 Apr 13 '11 at 4:10
• Can you give a small example? Even though at this point you've accepted an answer, it is unclear what it is you want. The code you give doesn't seem to match the words '...just the $j$th index should increase by 1.". Why wouldn't you just say b[j] = b[j]+1, without all the looping? – Mitch Apr 13 '11 at 13:58

$$\mathbf{b\_offset} = \mathbf{b} + \mathbf{e_j}$$
where $\displaystyle \mathbf{e_j}$ is the unit vector with all zeroes except the $j^{th}$ co-ordinate.
• @mr banana : See edit. I believe $e_j$ is standard notation. – Aryabhata Apr 13 '11 at 4:01