Sum divides product?

j = 1 n j ≢ 0 ( mod j = 1 n j ) \large \prod_{j=1}^n j \not \equiv 0 \quad \left ( \text{mod} \ \sum_{j=1}^n j \right)

For how many integers n n satisfying 1 n 180 1 \le n \le 180 is the non-congruence above fulfilled?

You may use this List of Primes as a reference.


The answer is 41.

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.

3 solutions

Julian Poon
Jul 25, 2015

The problem can be rewritten as:

n ! ≢ 0 ( mod n ( n + 1 ) 2 ) n!\not \equiv 0\quad \left( \text{mod }{\frac { n\left( n+1 \right) }{ 2 } } \right)


For n n is odd:

Substitute n = 2 k + 1 n=2k+1 , it becomes obvious that

( 2 k + 1 ) ! 0 ( mod ( 2 k + 1 ) ( k + 1 ) ) (2k+1)! \equiv 0 \quad \left( \text{mod }{ \left(2k+1\right)\left(k+1\right) } \right) is always the case


For n n is even, it becomes trickier.

Substitute n = 2 k n = 2k :

( 2 k ) ! 0 ( mod k ( 2 k + 1 ) ) (2k)! \equiv 0 \quad \left( \text{mod }{k\left(2k+1\right) } \right)

Now, the above is only true if 2 k + 1 2k+1 is divisible by any number smaller than k k , and will not be true if and only if 2 k + 1 2k+1 is prime.

So, the only n n that will satisfy n ! ≢ 0 ( mod n ( n + 1 ) 2 ) n!\not \equiv 0\quad \left( \text{mod }{\frac { n\left( n+1 \right) }{ 2 } } \right) are when n = Prime 1 n=\text{Prime} - 1

Since there are 42 42 primes between 2 2 and 181 181 , the answer is therefore 42 \boxed{42}


UPDATE: The answer should be 41 41 since n = 1 n=1 isn't one of the solutions since it is an odd, despite it being a Prime 1 \text{Prime}-1

Moderator note:

The line of "Now, the above is only true if 2 k + 1 2k+1 is divisible by any number smaller than k k " needs a bit more explanation. For example, 3 ! ≢ 0 ( m o d 4 ) 3! \not \equiv 0 \pmod{4} even though 2 divides 4. We have to ensure that there are enough factors that appear enough times, in order to arrive at that conclusion.

It seems like the solution is 41 instead of 42

Abdelhamid Saadi - 5 years, 10 months ago

Log in to reply

Oh yeah, thats right... n = 1 n=1 isn't included.

Julian Poon - 5 years, 10 months ago

Log in to reply

It appears the source I used to get the 43rd prime number included 1 as a prime. Wow. I agree, the answer should be 41.

Dylan Pentland - 5 years, 10 months ago

Log in to reply

@Dylan Pentland My intuition is getting really good.

Jake Lai - 5 years, 10 months ago

Calvin Lin Sorry, I do not get the Challenge Master Note. Though I can explain further.

If 2 k + 1 2k+1 can be split into 2 2 or more factors, and these factors are not equivalent to k k , then ( 2 k ) ! (2k)! definitely divides it.

From what I interpretate from your note is the case that 2 k + 1 2k+1 happens to have repeated factors (Like 3 2 3^{2} ) that are not inside of ( 2 k ) ! (2k)! . However, this would not happen since any factor that 2 k + 1 2k+1 have would definitely be smaller than 2 k 2k .

Julian Poon - 5 years, 10 months ago

Log in to reply

Yes, you are on the right track.

The claim of " n + 1 n ! n + 1 \mid n! if and only if n + 1 n+1 is composite" is not true. As such, you have to explain why we do indeed have " 2 k + 1 2 k ! 2k+1 \mid 2k! if and only if 2 k + 1 2k+1 is composite".

So what if "any factor of 2 k + 1 2k+1 would definitely be smaller than 2 k 2k "? The same is true of "any factor of n + 1 n+1 would definitely be smaller than n n ", but that is not a sufficient argument, due to the existence of repeated factors.

Calvin Lin Staff - 5 years, 10 months ago

Log in to reply

Oh... I get it...

I have spent 30 min on this, will get back to it later. This is harder than I expected.

Julian Poon - 5 years, 10 months ago

Log in to reply

@Julian Poon It's not that bad. You are close to it. The hard part is expressing yourself clearly so as to convince someone in a clear/simple manner.

Calvin Lin Staff - 5 years, 10 months ago
Tony Lee
Jul 26, 2015

This problem is equivalent to finding the number n n in range 1 n 180 1 \le n \le 180 such that the products of 1... n 1 ... n which are NOT divisible by sum of 1... n 1 ... n .

First simply the problem,

j = 1 n j = j ! \prod_{j=1}^n j = j!

and

j = 1 n j = j ( j 1 ) 2 \sum_{j=1}^n j = \frac{j (j-1)}{2}

So that the problem is to find the number of 1 n 180 1 \le n \le 180 such that k k is NOT integer

n ! = n ( n + 1 ) 2 k n! = \frac{n (n + 1)}{2} k

( n 1 ) ! = n + 1 2 k (n-1)! = \frac{n + 1}{2} k

k = 2 ( n 1 ) ! n + 1 k = \frac{2(n - 1)!}{n + 1}

Notice the denominator n + 1 n + 1 . If it is composite number, it can be divided by ( n 1 ) ! (n-1)! so that k k is integer. If it is 2 2 (prime number), it can be canceled by the 2 2 in numerator.

So the problem is to find the number of prime number in [ 1 , 180 + 1 ] [ 1, 180 + 1 ] , which is 42 42 . And minus 1 because when n = 1 n = 1 the denominator is canceled.

Therefore the answer is 41 41

I think you have a typo with the first 2 statements.

Julian Poon - 5 years, 10 months ago
Hadia Qadir
Jul 31, 2015

the product is j!; the sum is j(j+1)/2. j divides j!, and if j+1 is composite then j+1 divides j! since it is the product of q and r less than j. If j+1 is prime, however, the sum does not divide j! so if j+1 is prime the non-congruence will be satisfied. There are 42 primes 2<=p<=181, so the non congruence is satisfied 42 times

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...