RosettaCodeData/Task/Babbage-problem/PARI-GP/babbage-problem.parigp
2023-07-01 13:44:08 -04:00

8 lines
231 B
Text

m=269696;
k=1000000;
{for(n=1,99736,
\\ Try each number in this range, from 1 to 99736
if(denominator((n^2-m)/k)==1, \\ Check if n squared, minus m, is divisible by k
return(n) \\ If so, return this number and STOP.
)
)}