Cubed GCD

101 , 108 , 127 , 164 , 101, \, 108, \, 127, \, 164, \, \ldots

The numbers in the above sequence are of the form a n = 100 + n 3 a_n = 100 + n^3 for all integers n 1. n \geq 1. The maximum possible value of gcd ( a n , a n + 1 ) \gcd(a_n, a_{n + 1}) is D , D, and the smallest n n such that gcd ( a n , a n + 1 ) = D \gcd(a_n, a_{n + 1}) = D is N . N. Find the last three digits of D + N . D + N.


The answer is 851.

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.

1 solution

Steven Yuan
Mar 1, 2018

(This problem was inspired by an AIME problem .)

Let d n = gcd ( a n , a n + 1 ) . d_n = \gcd(a_n, a_{n + 1}). Since gcd ( a , b ) = gcd ( a , b a ) , \gcd(a, b) = \gcd(a, b - a), we have

d n = gcd ( 100 + n 3 , 100 + ( n + 1 ) 3 ) = gcd ( 100 + n 3 , ( n + 1 ) 3 n 3 ) = gcd ( 100 + n 3 , 3 n 2 + 3 n + 1 ) . \begin{aligned} d_n &= \gcd(100 + n^3, 100 + (n + 1)^3) \\ &= \gcd(100 + n^3, (n + 1)^3 - n^3) \\ &= \gcd(100 + n^3, 3n^2 + 3n + 1). \\ \end{aligned}

Because 3 3 n 2 + 3 n + 1 , 3 \nmid 3n^2 + 3n + 1, we can multiply 100 + n 3 100 + n^3 by 3 without changing the value of the greatest common divisor: d n = gcd ( 300 + 3 n 3 , 3 n 2 + 3 n + 1 ) . d_n = \gcd(300 + 3n^3, 3n^2 + 3n + 1). Now, we apply the Euclidean Algorithm:

d n = gcd ( 300 + 3 n 3 , 3 n 2 + 3 n + 1 ) = gcd ( 300 + 3 n 3 ( n 1 ) ( 3 n 2 + 3 n + 1 ) , 3 n 2 + 3 n + 1 ) = gcd ( 2 n + 301 , 3 n 2 + 3 n + 1 ) . \begin{aligned} d_n &= \gcd(300 + 3n^3, 3n^2 + 3n + 1) \\ &= \gcd(300 + 3n^3 - (n - 1)(3n^2 + 3n + 1), 3n^2 + 3n + 1) \\ &= \gcd(2n + 301, 3n^2 + 3n + 1). \end{aligned}

Because 4 2 n + 301 , 4 \nmid 2n + 301, we can multiply 3 n 2 + 3 n + 1 3n^2 + 3n + 1 by 4 and apply the Euclidean Algorithm again:

d n = gcd ( 2 n + 301 , 12 n 2 + 12 n + 4 ) = gcd ( 2 n + 301 , 12 n 2 + 12 n + 4 ( 6 n 897 ) ( 2 n + 301 ) ) = gcd ( 2 n + 301 , 270001 ) . \begin{aligned} d_n &= \gcd(2n + 301, 12n^2 + 12n + 4) \\ &= \gcd(2n + 301, 12n^2 + 12n + 4 - (6n - 897)(2n + 301)) \\ &= \gcd(2n + 301, 270001). \end{aligned}

Thus, D = 270001 , D = 270001, and N = 270001 301 2 = 134850 , N = \dfrac{270001 - 301}{2} = 134850, making our final answer D + N 270001 + 134850 851 ( m o d 1000 ) . D + N \equiv 270001 + 134850 \equiv \boxed{851} \! \pmod{1000}.


BONUS: What if instead of a n = 100 + n 3 a_n = 100 + n^3 we had a n = C + n 3 , a_n = C + n^3, where C C is an arbitrary positive integer? What are D D and N N in this case?

We have d n = gcd ( C + n 3 , C + ( n + 1 ) 3 ) = gcd ( C + n 3 , 3 n 2 + 3 n + 1 ) = gcd ( 3 C + 3 n 3 , 3 n 2 + 3 n + 1 ) = gcd ( 2 n + 3 C + 1 , 3 n 2 + 3 n + 1 ) d_n \; =\; \gcd\big(C+n^3,C+(n+1)^3\big) \; = \; \gcd\big(C+n^3,3n^2 + 3n + 1\big) = \gcd\big(3C+3n^3,3n^2+3n+1\big)= \gcd\big(2n+3C+1,3n^2+3n+1\big) and e n = gcd ( 4 ( 3 n 2 + 3 n + 1 ) , 2 n + 3 C + 1 ) = gcd ( 2 n + 3 C + 1 , 27 C 2 + 1 ) e_n \; = \; \gcd\big(4(3n^2 + 3n+1),2n+3C+1\big) \; = \; \gcd\big(2n+3C+1,27C^2 + 1\big)

  • If C C is even, then 2 n + 3 C + 1 2n+3C+1 is odd, and hence d n = e n d_n=e_n . This makes D = 27 C 2 + 1 D = 27C^2 + 1 and N = 3 2 C ( 9 C 1 ) N = \tfrac32C(9C-1) .
  • If C C is odd, then 2 n + 3 C + 1 2n+3C+1 is even, but 3 n 2 + 3 n + 1 3n^2 + 3n + 1 is odd. Thus d n d_n will be odd, and e n e_n will be either 2 d n 2d_n or 4 d n 4d_n . Since 27 C 2 + 1 4 ( m o d 8 ) 27C^2 + 1 \equiv 4 \pmod{8} , this means that d n d_n is the largest odd factor of e n e_n , and hence D D will be the largest odd factor of 27 C 2 + 1 27C^2 +1 . Thus we have D = 1 4 ( 27 C 2 + 1 ) D = \tfrac14(27C^2 +1) and N = 3 2 C ( 9 C 1 ) N = \tfrac32C(9C-1) .

Mark Hennings - 3 years, 3 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...