A Puzzle from Denis?

Otis

Elite Member
Joined
Apr 22, 2015
Messages
4,415
I came across an old scrap of paper last month, and I think the puzzle written on it was probably received from Denis.

987654321a + 123456789b + c = (a + b + c)3

Find solutions such that a ≠ 0 AND b ≠ 0


I've determined a method to generate solutions, but I don't know how to determine whether I've missed any. All comments welcome (unless you're grumpy).

Starting with 1, repeatedly add numbers {6,2,6,1,1} in that order, listing the running total.

7, 9, 15, 16, 17, 23, 25, 31, 32, 33, 39, 41, 47, 48, 49, …

T = any number in the list
a = (T^3 - T)/16
b = -8a
c = T + 7a

For each {a,b,c} solution found above, {-a,-b,-c} is also a solution.

?
 
I did some research along the lines of x=x^3, where x=±1, and found the following set of solutions which are missed by the post#1 method:-

a = 30864197 * p
b = -246913580 * p
c = 216049383 * p ± 1
where p is a non-zero integer (+ or -)
 
I did some research … found the following set of solutions which are missed [in] post#1 …

a = 30864197 * p
b = -246913580 * p
c = 216049383 * p ± 1
where p is a non-zero integer …
Wonderful!

I now suspect there may be additional solutions not covered by either method. For example, values of a < 30864197 that are not multiples of 3. (My a-values are all multiples of 3.)

PS: I got the idea for my approach, by first goofing around with part of a Subhotosh post (commemorating Ramanujan's birthday), followed by some brute-force and pattern recognition.

?
 
a = 30864197 * p
b = -246913580 * p

I missed the solutions where LHS=0. Seems obvious now! So a and b are as above, and then just omit the ±1 for c :-
c = 216049383*p

PS: I got the idea for my approach, by first goofing around with part of a Subhotosh post (commemorating Ramanujan's birthday), followed by some brute-force and pattern recognition.

Is this the Subhotosh post that inspired you? Very impressive work!
 
Wonderful!

I now suspect there may be additional solutions not covered by either method. For example, values of a < 30864197 that are not multiples of 3. (My a-values are all multiples of 3.)

PS: I got the idea for my approach, by first goofing around with part of a Subhotosh post (commemorating Ramanujan's birthday), followed by some brute-force and pattern recognition.

?
i was going to say that if goof around with anything that Subotosh posts then you are doomed but after seeing that the post you are referring to is about my good friend Ramanujan I will not comment.
 
Please excuse the delay

The delay was good because it helped me to see a different approach! The code below generates lots of solutions, and not all "a" values are multiples of 3. Here are some:-

a=25; b=1379930326580; c=-1379924783020
a=26; b=11738530; c=-11625391
a=44; b=1430932236712; c=-1430926625699
a=52; b=368800771193; c=-368797200417
a=96; b=196314234900; c=-196311341060

For each {a,b,c} solution, {a + 30864197*t, b - 246913580*t, c +216049383*t} is also a solution for any integer t

--

Let x = a+b+c

987654321*a + 123456789*b + (x-a-b) = x³
987654320*a + 123456788*b = x³ - x
A: 246913580*a + 30864197*b = x*(x² - 1)/4 = y

Also
B: 246913580*(a + 30864197) + 30864197*(b - 246913580) = y

And I found the following by brute force...
C: 246913580*(a-7716049) + 30864197*(b+61728393) = y+1

Equations A,B, and C are used in the following code:

Python:
a=0
b=0
y=0
x=2
while 1: # loop forever
    x += 1
    
    # Equation A
    r=x*(x*x - 1) 
    if (r & 3) == 0: # Can "r" be divided by 4
        r = r>>2 # geeky divide by 4
        
        t = (r-y) # "t" is the increase in "y"
        y=r
        # Use equation "C" to adjust "a" and "b" to match the increase in y
        a -= 7716049*t
        b += 61728393*t
        
        if a < 0:
            # Use equation "B" to keep "a" positive
            t = 1 + (-a) // 30864197 # floor division
            a += 30864197*t
            b -= 246913580*t
    
        c=x-a-b
        # if a<100: # Only show smaller a results?
        print "============="
        print "a=", a
        print "b=", b
        print "c=", c
        # print 987654321*a + 123456789*b + c - x*x*x  # Check
 
Top