CryNet,
<script>
const pagination = (num, length) => Array.from({length}, (_, i) => num * length - length + i)
document.write(pagination(1, 10)+"<br>");
document.write(pagination(2, 10)+"<br>");
document.write(pagination(1, 50)+"<br>");
document.write(pagination(2, 50))
</script>