Representing an Integer by a Sum of Like Powers

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

Many powers can be expressed as a sum of like powers, for example, or . Euler conjectured that no fifth power was the sum of four distinct fifth powers, but he was wrong: . Euler also conjectured that no fourth power was the sum of three distinct fourth powers, but he was wrong again: .


More generally, any positive integer is the sum of four square numbers (first conjectured by Diophantus and proved by Lagrange), nine cubes or 19 fourth powers. The general statement that an power can be represented as the sum of a certain number of powers is known as Waring's problem and was solved by Hilbert. Curiously, 7373170279850 is the largest known number not representable by three cubes.

In this Demonstration, the built-in Mathematica function PowersRepresentations is used to show various sums. Note that a small number of high exponents likely will not have any computable solutions. Likewise, a large number of small exponents will have many solutions.


Contributed by: Ed Pegg Jr (August 2022)
Open content licensed under CC BY-NC-SA



Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.