Non-Divisibility

Find the largest 2 digit value of n n such that n ( n + 1 ) ( 2 n + 1 ) n(n+1)(2n+1) is not divisible by 18.


The answer is 97.

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

William Isoroku
Mar 9, 2016

Rewrite the expression in terms of the sum of first n squares; n ( n + 1 ) ( 2 n + 1 ) = 6 ( 1 2 + 2 2 + 3 2 + . . . + n 2 ) n(n+1)(2n+1)=6(1^2+2^2+3^2+...+n^2)

It's obvious that n ( n + 1 ) ( 2 n + 1 ) n(n+1)(2n+1) is a multiple of 6 6 , thus the only possible remainders when reduced by modulo 18 18 are 6 , 12 6,12 . So we got 2 cases with 2 remainders;

Case 1: 6 ( 1 2 + 2 2 + 3 3 + . . . + n 2 ) = 18 x + 6 6(1^2+2^2+3^3+...+n^2)=18x+6

simplifying becomes; 1 2 + 2 2 + 3 3 + . . . + n 2 = 3 x + 1 1^2+2^2+3^3+...+n^2=3x+1

We want 1 2 + 2 2 + 3 3 + . . . + n 2 1 m o d 3 1^2+2^2+3^3+...+n^2\equiv{1\mod{3}}

Using the cycle of the reduced residues of n 2 m o d 3 n^2\mod{3} , we get the maximum of n = 96 n=96

Case 2: 6 ( 1 2 + 2 2 + 3 3 + . . . + n 2 ) = 18 y + 12 6(1^2+2^2+3^3+...+n^2)=18y+12

simplifying; 1 2 + 2 2 + 3 3 + . . . + n 2 = 3 y + 2 1^2+2^2+3^3+...+n^2=3y+2

We want 1 2 + 2 2 + 3 3 + . . . + n 2 2 m o d 3 1^2+2^2+3^3+...+n^2\equiv{2\mod{3}}

and using reduced residues of n 2 m o d 3 n^2\mod{3} again, we yield the maximum n = 97 n=97

Thus 97 97

Ashwin K
Mar 8, 2016

Went by trial and error method :

Trick is that denominator is 18 = 9 * 2 & so the numerator can't be even & multiple of 9  at the same time.

99 is out of option and even 98 but 97 is divisible by 6 and not by 18.

Alternate solution :

The given equation is a modified form of sum of squares to 'N' terms = N(N+1)(2N+1)/6 which means for any    value of 'N' by default is divisible by 6. By checking 98,99 are divisible by 18 because of  '99' which is already a multiple of 9 and so 97 is the answer.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...