| 1 | initial version |
Partial answer : for a single representation, you can use the sum_of_k_squares function :
sage: sum_of_k_squares(3, 12345678)
(63, 147, 3510)
sage: 63^2 + 147^2 + 3510^2
12345678
Finding all representations looks costly.
| 2 | No.2 Revision |
Partial answer : for a single representation, you can use the sum_of_k_squares function :
sage: sum_of_k_squares(3, 12345678)
(63, 147, 3510)
sage: 63^2 + 147^2 + 3510^2
12345678
Finding all representations looks costly.costly. Could you please provide an example of B and n you are willing to deal with ?
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.