Programming solutions to mathematical problems