# # ammprobmaple.txt (a Maple script) # # Warren Weckesser, Dept. of Mathematics, Colgate University # # This script searches for solutions to # n^3+n^2+n+1 = x^2 # for integers n and x. # start_time := time(): for n from 1 to 10000000 do m := (n^2+1)*(n+1): mroot := isqrt(m): if (mroot^2 = m) then printf("%g\n",n); end if; end do: stop_time := time(): printf("%g seconds\n",stop_time-start_time):