HP 50g Programming Competition: How Many Partitions of an Integer in 4 Squares
|
04-20-2018, 07:35 AM
Post: #28
|
|||
|
|||
RE: HP 50g Programming Competition: How Many Partitions of an Integer in 4 Squares
Of course, since Pari is a fully fledged programming language, one could write his own advanced factoring method.
One nice example is William B. Hart's ONE LINE FACTORING ALGORITHM: Code: OLF(x)=;i=1;while(i<x,if(issquare(ceil(sqrt(i*x))^2%x),return(gcd(x,floor(ceil(sqrt(i*x))-sqrt((ceil(sqrt(i*x))^2)%x)))));i++) This instantly yields 1401683395356260729391818575873415577599999999999999999981, the lower of the two factors (720^20-19). |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)