A problem by GH Hardy

Algebra Level 2

1 1 , 2 1 , 1 2 , 3 1 , 2 2 , 1 3 , 4 1 , 3 2 , 2 3 , 1 4 , \frac 1{1},\ \frac {2}{1},\ \frac {1}{2},\ \frac {3}{1},\ \frac {2}{2},\ \frac {1}{3},\ \frac {4}{1},\ \frac {3}{2},\ \frac {2}{3},\ \frac {1}{4},\ \ldots

If 1887 1920 \frac {1887}{1920} is the m th m^\text{th} term and 1789 2018 \frac {1789}{2018} is the n th n^\text{th} term of the sequence above, find m n . |m-n|.

Note : In this sequence, the fractions do not reduce. For example, 2 2 \frac{2}{2} is distinct from 1 1 . \frac{1}{1}.


The answer is 98.

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.

13 solutions

Andrew Hayes Staff
Apr 19, 2018

The pattern is that the denominator increases from 1, and the numerator decreases from some integer, n . n. Then the process repeats with n + 1. n+1.

1 1 , 2 1 , 1 2 , 3 1 , 2 2 , 1 3 , 4 1 , 3 2 , 2 3 , 1 4 , {\color{#D61F06}\frac 1{1}},\ {\color{#3D99F6}\frac {2}{1},\ \frac {1}{2}},\ {\color{#20A900}\frac {3}{1},\ \frac {2}{2},\ \frac {1}{3}},\ {\color{#69047E}\frac {4}{1},\ \frac {3}{2},\ \frac {2}{3},\ \frac {1}{4}},\ \ldots

Since the denominator increases by 1 while the numerator decreases by 1, the same-colored fractions always have the same sum of numerator and denominator.

Incidentally, the fractions we are given have the same sum of numerator and denominator:

1887 1920 : 1887 + 1920 = 3807 1789 2018 : 1789 + 2018 = 3807 \begin{aligned} \frac{1887}{1920} &: 1887+1920=3807 \\ \\ \frac{1789}{2018} &: 1789+2018=3807 \end{aligned}

Since these sums are the same, they are in the same sub-sequence (as if they were the same color). Then the difference between their indices is 2018 1920 = 98. 2018-1920=98. And so m n = 98 . \mid m-n \mid = \boxed{98}.


Incidentally, 1887 and 1920 are the birth-year and death-year of mathematician Srinivasa Ramanujan.

Thank you to the problem creator. At first I thought we'd have to actually find m and/or n. Sure I could do it, but this is so much easier. I only wonder, why they would want to include the 1 2 \frac{1}{2} ?

Jeremy Galvagni - 3 years, 1 month ago

Log in to reply

Initially I asked (m-n) but by mistake I posted answer as 49 , so I had to bring the 1/2

Mrigank Shekhar Pathak - 3 years, 1 month ago

Log in to reply

I will update the problem so it is just asking for m n . \mid m - n \mid.

Andrew Hayes Staff - 3 years, 1 month ago

Just for fun, m is the term 7242835 and n is the term 7242933.

A Former Brilliant Member - 3 years, 1 month ago

I have included 1887,1920 intentionally because where there is Hardy, there is Ramanujan

Mrigank Shekhar Pathak - 3 years, 1 month ago

"Incidentally". Upvote from me.

Zoltan Torok - 3 years, 1 month ago

I actually wrote the pattern in a triangle-like sequence. The n th row of the triangle began with (1/n) and as you moved from left to right in the row, the numerator went (1, 2, 3, ..., n) and the denominator (n, n-1, n-2, ..., 1). I did it in about 6 minutes this way. Yours is much nicer.

A Former Brilliant Member - 3 years, 1 month ago

Okay, I'm quibbling, but I think it should be made clear that this is not a sequence of actual fractional values, since 1887 2018 \dfrac{1887}{2018} reduces to 629 640 \dfrac{629}{640} , and so the difference would be more like 6438797 6438797 , not 98 98 . I went off the rails with that one. Say something to the effect, "don't reduce the fractions".

Michael Mendrin - 3 years, 1 month ago

Log in to reply

Ah, fair point. I will add a note.

Andrew Hayes Staff - 3 years, 1 month ago

Log in to reply

They aren't really fractions at all. They're just ordered pairs - the notation as fractions is a red herring.

Stewart Gordon - 3 years, 1 month ago

I would Like share the same problem quizzes sequences :)

Naren Bhandari - 3 years, 1 month ago

Some of us are not familiar with the notation. It would have been helpful to know what “|m-n|” meant, beyond “the absolute value of m-n” which would have been less than one and obviously not what was expected.

Joan Cunningham - 3 years, 1 month ago

That "incidental" easter egg is indeed a great tribute to Ramanujan.

Kuntal Sarkar - 3 years ago

I was thinking of 1887 as the birth year of a mathematician before I saw your solution.

Poh Seng Tan - 3 years ago
Arjen Vreugdenhil
Apr 23, 2018

The sequence consists of infinitely many subsequences in order:

  • 1 fraction where the sum of the numbers equals 2,

  • 2 fractions where the sum of the numbers equals 3,

  • 3 fractions where the sum of the numbers equals 4,

  • ...

  • s 1 s - 1 fractions where the sum of the numbers equals s s ,

  • ...

Since 1887 + 1920 = 1789 + 2018 1887 + 1920 = 1789 + 2018 , the two given fractions are part of the same subsequence.

Now note that within each subsequence with sum s s , the denominators increase 1 , 2 , , s 1 1, 2, \dots, s-1 while the numerators decrease s 1 , s 2 , , 1 s-1, s-2, \dots, 1 . Since each denominator is one more than the previous one, the distance between two fractions in a subsequence is equal to the difference of their denominators.

In this case, distance = m n = 2018 1920 = 98 . \text{distance} = |m-n| = |2018 - 1920| = \boxed{98}.

Binky Mh
Apr 22, 2018

The list of numerators and denominators can both be shown in their respective triangular list, like this: We want to figure out their position in the sequence: (Note that the triangle numbers are on the right-end of each row.)

Let N N be the numerator, D D be the denominator, and R R be the row of the n t h n^{th} term in the sequence.

From the triangle of denominators, we can see that each term is D D places after the end of the previous row ( R 1 ) (R-1) . Using the triangle number formula n 2 + n 2 \frac{n^2+n}{2} , we can find the position from ( R 1 ) 2 + ( R 1 ) 2 + D \frac{(R-1)^2+(R-1)}{2}+D .

Now we need to find the row of the n t h n^{th} term. To do this, consider the sums of each numerator-denominator pair: they all result in the same distinct numbers for each row. With this, we can find the row for each term using R = N + D 1 R=N+D-1 . Substituting this into the formula above gives us:

f ( n ) = ( N + D 2 ) 2 + ( N + D 2 ) 2 + D f(n)=\frac{(N+D-2)^2+(N+D-2)}{2}+D

Plugging 1887 1920 \frac{1887}{1920} and 1789 2018 \frac{1789}{2018} into this formula, we get 7242835 7242835 and 7242933 7242933 respectively. With these, we can get our final answer: 7242835 7242933 = 98 |7242835-7242933|=\boxed{98}

The formule you came up with is correct. However, you divide the end result again by 2. I suppose you ment to calculate the (N+D-2)²+(N+D-2) part, divide it by 2 and then add D and do this 2 times. This gets you: 1887/1920: (1887+1920-2)²+(1887+1920-2)² and this divided by 2 and then + 1920 = 7 242 835 - 7 242 933 = 98 so the last division (which you just added for some reason) by 2 is not correct. An alternative way to quickly verify this is by noticing that the division part in the function is the same since N+D = 3807 for the given divisions. Therefore, the only difference left is just the D's that differ so you get Huge number + 2018 - same huge number - 1920 = 98 and then you could quickly see that the 49 you came up with is just the extra division by 2. All the rest is very well done though!

Brent Smits - 3 years, 1 month ago

Log in to reply

When this problem was first put up, it originally asked for |m-n|/2, but it has since been changed. I've updated my answer to match it now, so thanks for pointing it out.

Binky MH - 3 years, 1 month ago

I think you've slipped an extra 2 at the end of the last operation.

Emilio Pérez - 3 years, 1 month ago

Log in to reply

Nice spot, thanks.

Binky MH - 3 years, 1 month ago

This is the longer way to do it, but I did it this way also. Nice puzzle it is.

Karol Turbiarz - 3 years, 1 month ago
한얼 이
Apr 23, 2018

분모 + 분자 = 3807 나오는데, 시그마 n 공식인 n(n+1)/2에서 m번째와 n번째를 찾으면, {3806(3807)/2 + 1887} - {3806(3807)/2 + 1789} = 1887-1789 = 98

Salvo Luca
Apr 29, 2018

Premise : I'm not English so I'm sorry for any mistake in the text.

First Solution :

1887+1920=1789+2018 => solution: |2018-1920|=98

Second solution :

( x = a + b c + d 1 x ) ( ( c + d ) ( a + b ) ) ( b 1 ) + ( d 1 ) = ( x = a + b c + d 1 x ) + a c |(\sum_{x=a+b}^{c+d-1} x)-((c+d)-(a+b))-(b-1)+(d-1)| = |(\sum_{x=a+b}^{c+d-1} x)+a-c|

As a b = 1887 1920 \frac{a}{b} = \frac{1887}{1920} ; c d = 1789 2018 \frac{c}{d} = \frac{1789}{2018}

Number of jumps performed from the fraction in the serie with denominator equivalent to 1 and sum of numerator and denominator equivalent to (a+b) to the other with same denominator but sum equivalent to (c+d):

( x = a + b c + d 1 x ) (\sum_{x=a+b}^{c+d-1} x)

Number of unnecessary jumps performed in the precedent step:

( ( c + d ) ( a + b ) ) ((c+d)-(a+b))

Offset from the first equation with denominator 1 to the actual fraction a b \frac{a}{b}

( b 1 ) (b-1)

Offset from the second equation with denominator 1 to the actual fraction c d \frac{c}{d}

( d 1 ) (d-1)

( x = a + b c + d 1 x ) + a c = 98 |(\sum_{x=a+b}^{c+d-1} x)+a-c| = 98

Zest Du
Apr 28, 2018
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
a = 1
b = 1
term = 1
topa = 1
topb = 1
solve = 0
while solve == 0 :
    term = term + 1
    if a == 1 :
        topa = topa + 1
        a = topa
    else:
        a = a - 1
    if b == topb :
        topb = topb + 1
        b = 1
    else :
        b = b + 1
    if a == 1887 and b == 1920 :
        m = term
    elif a == 1789 and b == 2018 :
        n = term
        solve = 1
print(abs(m-n))

1
2
#output
98

Ravi Kant
Apr 27, 2018

Clemens Frahnow
Apr 26, 2018

Since denominator+numerator is the same in both terms, the solution simply is 1887-1789=||98||.

Elijah Ensley
Apr 24, 2018

The sequence of the numerator can be modeled by a ( x ) = x ( x + 1 ) 2 x + 1 a(x)=\frac{x(x+1)}{2} -x+1 , where x x is the value of the numerator and a ( x ) a(x) is equal to the first term at which that value appears in the sequence (where x x and a ( x ) a(x) are positive integers).

The sequence of the denominator can be modeled by b ( x ) = x ( x + 1 ) 2 b(x)=\frac{x(x+1)}{2} , where x x is the value of the denominator and b ( x ) b(x) is equal to the first term at which that value appears in the sequence (where x x and b ( x ) b(x) are positive integers).


Now we must account for the fact every positive integer appears multiple times in the sequence. We must write functions to describe the second, third, etc. term that a given value appears in the sequence.

We can account for this in a ( x ) a(x) with the function a i ( x ) = a ( x + i ) x a_{i}(x)=a(x+i)-x , where i i is a positive integer that describes if this is the first ( i = 1 i=1 ), second ( i = 2 i=2 ), third ( i = 3 i=3 ), etc. term at which the value x x appears in the sequence.

We account for this in b ( x ) b(x) with the function b j ( x ) = b ( x + j 2 ) + x b_{j}(x)=b(x+j-2)+x , where j j is a positive integer that describes if this is the first ( j = 1 j=1 ), second ( j = 2 j=2 ), third ( j = 3 j=3 ), etc. term at which the value x x appears in the sequence.


To first find m m , we plug in our values 1887 1887 and 1920 1920 into a i ( x ) a_{i}(x) and b j ( x ) b_{j}(x) respectively. The term at which a i ( 1887 ) a_{i}(1887) = b j ( 1920 ) b_{j}(1920) is equal to m m .

We find that a i ( 1887 ) = b j ( 1920 ) a_{i}(1887)=b_{j}(1920) at i = 1920 i=1920 , j = 1887 j=1887 .

a 1920 ( 1887 ) a_{1920}(1887) and b 1887 ( 1920 ) b_{1887}(1920) are both equal to 7242835 7242835 , which is the value of m m .


Following the same set of steps for 1789 2018 \frac{1789}{2018} to find n n , we find that a i ( 1789 ) = b j ( 2018 ) a_{i}(1789)=b_{j}(2018) at i = 2018 i=2018 , j = 1789 j=1789 .

a 2018 ( 1789 ) a_{2018}(1789) and b 1789 ( 2018 ) b_{1789}(2018) are both equal to 7242933 7242933 , which is the value of n n .


Plugging our values for m m and n n into m n |m-n| , we find that 7242835 7242933 = 98 |7242835-7242933|=98 .

Abhay Chacko
Apr 24, 2018

(m)th no is 1887/1920; (n)th is 1789/2018 here( 2018-1920)=(1887-1789)=98 so started from same number. 1887+1919=3806; If not started from same number

Let as represent them as {A/B} and {C/D},

X)find position of (A/1) as[{(A-1)÷2}×A]+1 【it is the sum of all numbers till (A-1)+1】

●For1887/1920,position of 1887/1 is (1886÷2)×1887+(1)=1779442.from the start ●For 1789/2018,position of 1789/1 is (1788÷2)×1789+(1)=1599367 from the start

Y)find position of A/B from A/1 {A×(B-1)}+[{(B-1)÷2}×B]

●For 1887/1920 it is (1887×1919)+(1919÷2)×1920= 3621153+1842240=5463393 ●For 1789/2018 it is (1789×2017)+(2017÷2)×2018= 3608413+2035153=5643566

So the position of A/B is X+Y from the start,

●For 1887/1920 it is 1779442+5463393=7242835 from start ●For 1789/2018 it is 1599367+5643566=7242933 from start

So the difference is 7242933-7242835=98

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# https://brilliant.org/weekly-problems/2018-04-23/intermediate/?p=5
vals = ['1887/1920', '1789/2018']
counter = 0
z = 0
results = {}
for c in range(1,4000):
    for j in range(1,c+1):
        counter += 1      
        x = '%d/%d' % (abs(c-2*(j-1)), j)
        if x in vals:
            results[x] = counter
    counter = 0
print results 

print abs(results[vals[0]]-results[vals[1]])/2

1
2
{'1789/2018': 5824, '1887/1920': 5726}
49

Henri X
Apr 22, 2018

Visualising Pascal's triangle makes this much easier. First, calculating the m^th term, 1887/1920. As we know 1/1920 is on the 1920th row, and to get to the row that 1887/1920, you have to add 1887-2 to the denominator, because you dont count the row 1/1920 is on and the row it is actually on. So 1885+1920=3805. Do the same thing for the other number and you also get 3805. Then you the calculate the difference between the two numerators which is -98(m-n), sub into 1/2|(m-n)|, which results in 49

The denominator reset to 1 in every power of 2 going down from the value of that power, so a given number is in a subsequence if their integer value of its log2 is the same. log2(1920) = 10.9068 -> 10 log2(2018) = 10.9787 -> 10 M is bigger than N because is closer to 1

Then their difference would be the same in whichever subsequence they are. In this case, the difference is -98, but being the "lowest" number in a greater position, this number should be taken as positive. Divided by 2 gives us 49 as result.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...