Project Euler, solved with Matlab