Easy as a , b , c , 1 , 2 , 3 a,b,c,1,2,3 \space ?

Find the number of distinct ordered triples ( a , b , c ) (a,b,c) that satisfy the equation

a b c 54 = 9 a + 9 b + 9 c \large abc - 54 = 9a + 9b + 9c

where a , b , c a,b,c are positive (not necessarily distinct) integers.


The answer is 106.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

A quick overview of one possible solution method....

Let x = a + 3 , y = b + 3 , z = c + 3 x = a + 3, y = b + 3, z = c + 3 . The given equation can then be written as

1 x + 1 y + 1 z = 1 3 \dfrac{1}{x} + \dfrac{1}{y} + \dfrac{1}{z} = \dfrac{1}{3} .

Now look for solutions with 4 x 9 4 \le x \le 9 and x y z x \le y \le z . Then with, say, x = 4 x = 4 we end up with

1 y + 1 z = 1 3 1 4 = 1 12 12 y 12 z = y z ( y 12 ) ( z 12 ) = 144 \dfrac{1}{y} + \dfrac{1}{z} = \dfrac{1}{3} - \dfrac{1}{4} = \dfrac{1}{12} \Longrightarrow 12y - 12z = yz \Longrightarrow (y - 12)(z - 12) = 144 .

We can then look at the various factorizations of 144 144 to establish values for y , z y,z and thus triples ( x , y , z ) (x,y,z) with x y z x \le y \le z , which are

( 4 , 13 , 156 ) , ( 4 , 14 , 84 ) , ( 4 , 15 , 60 ) , ( 4 , 16 , 48 ) , ( 4 , 18 , 36 ) , ( 4 , 20 , 30 ) , ( 4 , 21 , 28 ) , ( 4 , 24 , 24 ) (4,13,156), (4,14,84), (4,15,60), (4,16,48), (4,18,36), (4,20,30), (4,21,28), (4,24,24) .

These translate to triples ( a , b , c ) (a,b,c)

( 1 , 10 , 153 ) , ( 1 , 11 , 81 ) , ( 1 , 12 , 57 ) , ( 1 , 13 , 45 ) , ( 1 , 15 , 33 ) , ( 1 , 17 , 27 ) , ( 1 , 18 , 25 ) , ( 1 , 21 , 21 ) (1,10,153), (1,11,81), (1,12,57), (1,13,45), (1,15,33), (1,17,27), (1,18,25), (1,21,21) .

To then find the number of ordered triples we then need to count all permutations of these triples. Doing this for all possible values of x x , we end up with a total of 106 \boxed{106} solution triples.

Note: The remainder of the ascending triples are

( 2 , 5 , 117 ) , ( 2 , 6 , 42 ) , ( 2 , 7 , 27 ) , ( 2 , 9 , 17 ) , ( 2 , 12 , 12 ) , ( 3 , 4 , 39 ) , ( 3 , 5 , 21 ) , ( 3 , 6 , 15 ) , ( 3 , 7 , 12 ) , ( 3 , 9 , 9 ) , ( 4 , 4 , 18 ) , ( 5 , 5 , 9 ) , ( 6 , 6 , 6 ) (2,5,117), (2,6,42), (2,7,27), (2,9,17), (2,12,12), (3,4,39), (3,5,21), (3,6,15), (3,7,12), (3,9,9), (4,4,18), (5,5,9), (6,6,6) .

Sir I am commenting this not because of math but because of error occurring in my lifetime subscription. waiyan221113@gmail.com has given me lifetime premium to holakolala7@gmail.com. Although the link that says ‘activate lifetime premium ‘ arrive, when I click the link ,the error is shown.I am requesting support.brilliant.org for three days in a row and they reply nothing. Please help me sir.

Lu Min Khant - 1 year, 3 months ago
Frank Petiprin
Apr 1, 2019
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
def my_range4(start, end, step):
    while start <= end:
        yield start
        start += step
def my_range5(start, end, step):
    while start <= end:
        yield start
        start += step
def my_range6(start, end, step):
    while start <= end:
        yield start
        start += step
start =0
end=200
step = 1
cnt=0
for a in my_range4(start, end, step):
    for b in my_range5(start, end, step):
        for c in my_range6(start, end, step):
            left=a*b*c-54
            right =9*a+9*b+9*c
            if (abs(left-right)==0):
                cnt+=1
                print(a,b,c,left,right,'count',cnt)
print('Count Of Numbers =',cnt,'   ','Start End Step ',start,end,step)              
'''
#       Print Last 7 numbers
57 12 1 630 630 count 100
81 1 11 837 837 count 101
81 11 1 837 837 count 102
117 2 5 1116 1116 count 103
117 5 2 1116 1116 count 104
153 1 10 1476 1476 count 105
153 10 1 1476 1476 count 106

Count Of Numbers = 106    Start End Step  0 200 1

I would do it like this. The code is slightly more efficient: instead of N 3 N^3 loops I have just ( N 3 ) \binom{N}{3} .

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""
solution of:
    https://brilliant.org/problems/easy-as-abc123-space/?ref_id=1564825
"""

import itertools

def get_weight(in_a, in_b, in_c):
    """
    returns the number of ordered triplets,
    which can be generated using the set {in_a, in_b, in_c}
    """
    tmp_len = len({in_a, in_b, in_c})
    if tmp_len == 1:
        res = 1
    elif tmp_len == 3:
        res = 6
    else:
        res = 3
    return res

N = 200
CUR_GEN = itertools.combinations_with_replacement(range(1, N), 3)
RES_SUM = sum((get_weight(a, b, c) for (a, b, c) in CUR_GEN if a*b*c-54 == 9*(a+b+c)))
print(RES_SUM)

Piotr Idzik - 1 year ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...