triangular numbers but with a more complex formula | ScratchStats