4 ms·
It’s not factorial, that’d be ludicrous… Rather it’s (n * (n+1))/2, which is similar to factorial but using addition instead of multiplication.(52+51+…+1) So a
by ninkendo 2y ago
It’s not factorial, that’d be ludicrous… Rather it’s (n * (n+1))/2, which is similar to factorial but using addition instead of multiplication.(52+51+…+1) So a lot, lot smaller.
- user3939382 2y agoOh yeah, you’re only doing the pairs, you’re right
- Dylan16807 2y agoDon't divide by two. Order matters. And that +1 is going the wrong way so you might as well just say n^2.
- ninkendo 2y agoOh, right, duh. Yeah it’s just n^2. (If it was n+(n-1)+…+1, then my equation would have been correct, but you’re right, since order matters it’s just plain n^2.)