All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Cubic Equation (Posted on 2013-06-09) Difficulty: 4 of 5
Determine all triplets (a,b,c) of nonzero integers satisfying:
987654321*a + 123456789*b + c = (a + b + c)3

Prove that there are no others.

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
re(4): an open letter to Charlie Comment 13 of 13 |
(In reply to re(3): an open letter to Charlie by Steve Herman)

Yes, the below program goes much faster, even in interpreted UBASIC, needed because some intermediate results used in solving for a and b exceed the capacity of QB64.

 20   ' x = a+b+c
 30   for X=0 to 1000000
 40       Rhs=X*X*X-X
 50
 60       if Rhs @ 4 = 0 then
 70           :A=-7716049*Rhs//4:B=61728393*Rhs//4
 80           :Q=int(abs(A)/30864197)
 90           :A=A+Q*30864197:B=B-Q*246913580
100           :while A<0
110           :A=A+30864197:B=B-246913580
120           :wend
130           :while B>=0
140           :C=X-A-B
150           :if C>=0 then print A,B,C
160           :A=A+30864197:B=B-246913580
170           :wend
190   next X

0       0       0
0       0       1
450     4500    5050
7350    6000    6650
27150   1500    1350

About 1 second run time (under 1 second for all the solutins to appear).

The Euclidean algorithm for finding GCD was used to find the constants that multiply by the coefficients to produce the GCD, 4, and zero.


  Posted by Charlie on 2013-06-13 18:01:36
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information