An implementation of the quadratic sieve for educational purposes