PowersRepresentations

PowersRepresentations[n,k,p]

gives the distinct representations of the integer n as a sum of k non-negative p^(th) integer powers.

Details

Examples

open allclose all

Basic Examples  (1)

Find representations of 1729 as a sum of two cubes:

Scope  (2)

Representation of relatively large numbers as the sum of two squares:

Known taxicab numbers:

Properties & Relations  (2)

Use FindInstance to find a solution instance:

PowersRepresentations gives ordered partitions of fixed length:

Possible Issues  (1)

The scale of the computation increases rapidly with the size of the number:

Introduced in 2007
 (6.0)