4 ms·
For fixed n, a block (x,y) contains the numbers n/2y^2-n/2y + yz + x for all 0 <= z < n.
by chickenstrips 8y ago
For fixed n, a block (x,y) contains the numbers n/2y^2-n/2y + yz + x for all 0 <= z < n.
- SomeMathComment 8y ago(n/2)y^2-(n/2)y + yz + x
- drdeca 8y agoMaking sure I am parsing that correctly: Is that ((n/2) * y^2) - ((n/2) * y) + (y * z) + x ? (For z ranging from 0 to n) If so, alright, that makes more sense to me, thanks. So, n * (y * (y-1)/2) + x + y * z ? Edit: does HN have an escape character to deal with the asterisks?
- dEnigma 8y agoHaving whitespace after the asterisk or indenting the line by two or more spaces seem to be the only possibilities according to the "Formatting Options"[1] [1]https://news.ycombinator.com/formatdoc https://news.ycombinator.com/formatdoc