Here's a way of writing it you might like: define $m =\lfloor t/5 \rfloor$, and we have $$ n = 5\frac{m(m+1)}{2} + m(t \bmod 5) $$ where $t \bmod 5$ is the remiander of the division $t \div 5$.
Here's a way of writing it you might like: define $m =\lfloor t/5 \rfloor$, and we have $$ n = 5\frac{m(m+1)}{2} + m(t \bmod 5) $$ where $t \bmod 5$ is the remiander of the division $t \div 5$.