Message Boards Message Boards

0
|
7812 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Show n=(a²+b²+c²) where a, b and c must be different values in W|A?

Posted 8 years ago

How can I show:

n=(a²+b²+c²)

a = ? 

b = ? 

c = ? 

Where a, b and c MUST be different values, as an equation?

POSTED BY: Luke D
2 Replies

Another variant - read about function PowersRepresentations[n,3,2],

for example

PowersRepresentations[110011, 3, 2]

{{3, 21, 331}, {7, 159, 291}, {7, 219, 249}, {9, 83, 321}, {9, 207, 259}, {15, 15, 331}, {15, 169, 285}, {21, 201, 263}, {27, 79, 321}, {27, 141, 299}, {29, 117, 309}, {29, 177, 279}, {45, 219, 245}, {47, 69, 321}, {47, 111, 309}, {57, 61, 321}, {61, 147, 291}, {63, 129, 299}, {63, 219, 241}, {65, 81, 315}, {69, 69, 317}, {69, 135, 295}, {69, 155, 285}, {79, 171, 273}, {81, 137, 291}, {81, 213, 241}, {83, 159, 279}, {101, 123, 291}, {101, 159, 273}, {111, 219, 223}, {117, 171, 259}, {129, 129, 277}, {137, 171, 249}, {141, 201, 223}, {155, 195, 219}, {159, 169, 237}, {169, 183, 219}, {171, 171, 227}}

In[12]:= Clear[lukEq]
lukEq[n_Integer] := FindInstance[a^2 + b^2 + c^2 == n && a > b > c, {a, b, c}, Integers] /; Positive[n]

In[14]:= lukEq[17]
Out[14]= {{a -> 4, b -> 1, c -> 0}}

In[15]:= lukEq[2016]
Out[15]= {{a -> 40, b -> 20, c -> 4}}
POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract