If you mean faster as in more performant: * Don't...
# random
k
If you mean faster as in more performant: * Don't use sequences, they box the numbers * Look up some faster algorithms * Stop checking when
i^2 > n
as was already said, but avoid the
sqrt
.