HP 50g Programming Competition: How Many Partitions of an Integer in 4 Squares
|
04-13-2018, 11:35 AM
(This post was last modified: 04-13-2018 11:35 AM by Gerald H.)
Post: #1
|
|||
|
|||
HP 50g Programming Competition: How Many Partitions of an Integer in 4 Squares
As is well-known, every integer can be represented as sum of max 4 squares
https://en.wikipedia.org/wiki/Lagrange%2...re_theorem & that the number of such representations can be calculated as https://en.wikipedia.org/wiki/Jacobi%27s...re_theorem respecting order & sign. The task is to write a User RPL programme to calculate the number of representations of any natural number exactly & swiftly. Winner will be programme with lowest value of time*cuberoot(size). I have a programme that processes 720^20 in 5.6 sec. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)