PowersRepresentations
[n, k, p]Get the ways licence plate number 1729 can be represented as the sum of two cubes:
PowersRepresentations[1729, 2, 3]
See 1729 for the full backstory.
Demonstrate the validity of the Pythagorian triple: 3^2 + 4^2 == 5^2
PowersRepresentations[25, 2, 2]
Since 0 is allowed in the sum, PowersRepresentations[n, k+1, p]
is includes PowersRepresentations[n, k, p]
with by inserting a zero element at the beginning:
PowersRepresentations[25, 3, 2]