Prime Powers Dividing Factorials

For every prime number p p and non-negative integer k k , define A p ( k ) A_p (k) to be the number of positive integers n n such that p k n ! p^k \mid n! but p k + 1 ∤ n ! p^{k+1} \not \mid n! .

Let A p A_p be the set of values of A p ( k ) A_p (k) . How many (distinct) elements are there in A 2017 A_{2017} ?


The answer is 3.

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

Calvin Lin Staff
Dec 8, 2016

We will solve this for a general prime p p . There are 3 distinct values for A p ( k ) A_p(k) , namely 0 , p 1 , p 0, p-1, p .

Recall that for a prime p p and a positive integer n n , the number of prime powers of p p that divides n ! n ! is

k p ( n ) = n p + n p 2 + n p 3 + k_p(n) = \lfloor \frac{n}{p} \rfloor + \lfloor \frac{n}{p^2} \rfloor + \lfloor \frac{n}{p^3} \rfloor + \ldots

First, we will show that these 3 values exist.
The values of A p ( 0 ) A_p (0) satisfy p 0 n ! p^0 \mid n! and p 1 ∤ n ! p^1 \not \mid n! , so n = 1 , 2 , , p 1 n = 1, 2, \ldots, p-1 . There are p 1 p-1 of them.
The values of A p ( 1 ) A_p (1) satisfy p 1 n ! p^1 \mid n! and p 2 ∤ n ! p^2 \not \mid n! , so n = p , p + 1 , , 2 p 1 n = p, p+1, \ldots, 2p-1 . There are p p of them.
The values of A p ( p ) A_p (p) satisfy p p n ! p^p \mid n! and p p + 1 ∤ n ! p^{p+1} \not \mid n! . We know that n < p 2 n < p^2 is not sufficient, since k p ( p 2 1 ) = p 1 k_p ( p^2 - 1) = p-1 . However, k p ( p 2 ) = p + 1 k_p(p^2 ) = p+1 . This means that if p p n ! p^p \mid n! , then p p + 1 n ! p^{p+1} \mid n! . Thus, there are 0 of them.


Now, we show that that's all there is. We make the following observations:

  1. Claim: If m p n < ( m + 1 ) p mp \leq n < (m+1) p for some m 1 m \geq 1 , then k p ( n ) = k p ( m p ) k_p (n) = k_p (mp) .
    This follows because n p i = m p p i \lfloor \frac{n}{p^i} \rfloor = \lfloor \frac{mp}{p^i} \rfloor for all i i , so their sums are the same.

  2. In the case of m = 0 m = 0 , meaning 0 < n < p 0 < n < p , then we have p 1 p-1 positive integers in A p ( 0 ) A_p(0) . Henceforth, let m 1 m \geq 1 .

  3. Since k p ( m p ) = k p ( m p + 1 ) = = k p ( m p + p 1 ) k_p (mp) = k_p (mp+1) = \ldots = k_p (mp+p-1 ) , this implies that A p ( k ) A_p (k) must be a multiple of p p . Henceforth, we can simply consider the values of k p ( m p ) k_p (mp) . For each p k ( m p ) ! p^k \mid (mp)! and p k + 1 ∤ ( m p ) ! p^{k+1} \not \mid (mp)! , then there are p p values in A p ( k ) A_p (k) .

  4. Claim: k p ( m p ) k_p (mp) is an increasing function in m m .
    This is true because the floor function is an increasing function, and ( m + 1 ) p p m p p + p p = m p p + 1 > m p p . \lfloor \frac{(m+1)p}{p} \rfloor \geq \lfloor \frac{mp}{p} \rfloor + \lfloor \frac{p}{p} \rfloor = \lfloor \frac{mp}{p} \rfloor + 1 > \lfloor \frac{mp}{p} \rfloor.

  5. Since k p ( m p ) k_p(mp) is an increasing function, this means that there is at most 1 value of m p mp that satisfies p k ( m p ) ! p^k \mid (mp)! and p k + 1 ∤ ( m p ) ! p^{k+1} \not \mid (mp)! . Hence, by observation 3, A p ( k ) = 0 A_p (k) = 0 or p p for k 1 k \geq 1 .

  6. In conclusion, we have A p ( k ) { 0 , p 1 , p } A_p (k) \in \{ 0, p-1, p \} .

  7. The first paragraph tells us that { 0 , p 1 , p } { A p ( k ) } \{ 0, p-1, p \} \subset \{ A_p (k) \} . Hence, { A p ( k ) } = { 0 , p 1 , p } \{ A_p (k) \} = \{ 0, p-1, p \} .

This establishes that the answer is at most 3.

@Muhammad Rasel Parvej Writing up the proof this way makes it very clear what the main steps are, and how they lead to the conclusion. It also shows why this is a natural thought progression in working through the problem, which isn't too common for olympiad problems.

These ideas are all presented in your proof, but it's hard to tease out what is used and when, or what the impact is.

Calvin Lin Staff - 4 years, 6 months ago

Log in to reply

Thanks! I'll try to present my proof this way from now.

Muhammad Rasel Parvej - 4 years, 6 months ago

Log in to reply

Not all proofs work well in this way. In this case, because each step was small and natural, I felt that this presentation made a lot more sense. Even if someone didn't understand the proof of a claim, at the very least if they agree with the claim, they can skip and move on to the next point.

Calvin Lin Staff - 4 years, 6 months ago

For A p ( 1 ) A_p(1) , n = p , p + 1 , . . . . 2 p 1 n=p,p+1, .... 2p-1 .

Muhammad Rasel Parvej - 4 years, 6 months ago

Log in to reply

Yup, was fixing / tweaking. E.g. I removed the p 3 p \geq 3 condition. I initially threw it in just in case the A p ( 1 ) A_p (1) didn't work out. After reviewing, p = 2 p=2 is still fine, so I added that back in.

Let me know if there are any other improvements.

Calvin Lin Staff - 4 years, 6 months ago

There are 3 3 distinct values of A p ( k ) A_p(k) , for any prime p p . The distinct values are: 0 , p 1 0, p-1 and p p .

Let's first see when A p ( k ) A_p(k) can be 0 0 .

Consider the integers n = x × p m n=x \times p^m for some integers m > 1 m>1 and x 1 x\geq 1 , with p ∤ x p \not \mid x . Also assume that a 0 a\geq 0 is the highest exponent of p p such that p a ( n 1 ) ! p^a \mid (n-1)! . Then n ! n! is simultaneously the FIRST factorial that is divided by p a + 1 , p a + 2 , p^{a+1}, p^{a+2},\ldots{ } \ldots{ } \ldots{ } and p a + m p^{a+m} . Now, it is easy to see that A p ( k ) = 0 A_p(k)=0 for k = a + 1 , a + 2 , k=a+1, a+2,\ldots{ } \ldots{ } \ldots{ } and a + m 1 a+m-1 .

Now how A p ( k ) A_p(k) can be p p ?

Recall the argument for [When A p ( k ) A_p(k) can be 0 0 ]. It's obvious that p k n ! p^k \mid n! but p k + 1 ∤ n ! p^{k+1} \not \mid n! for k = a + m k=a+m . Notice that the next multiple of p p after n = x × p m n=x \times p^m is n + p = x × p m + p n+p=x \times p^m+p . As the number of integers w w such that n w ( n + p 1 ) n\leq w \leq (n+p-1) is p p and for each w w , p a + m w ! p^{a+m} \mid w! but p a + m + 1 ∤ w ! p^{a+m+1} \not \mid w! , and p a + m ∤ ( n 1 ) ! p^{a+m} \not \mid (n-1)! , and p a + m + 1 ( n + p ) ! p^{a+m+1} \mid (n+p)! , then A p ( k ) = p A_p(k)=p for k = a + m k=a+m .

I believe it's already clear that A p ( k ) A_p(k) can't exceed p p .

Then when A p ( k ) A_p(k) can be ( p 1 ) (p-1) ?

Consider the case when k = 0 k=0 . Then we have n = 1 , 2 , , ( p 1 ) n=1, 2,\ldots{ } \ldots{ } \ldots{ },(p-1) such that p k = p 0 = 1 n ! p^k=p^0=1 \mid n! but p 0 + 1 = p 1 ∤ n ! p^{0+1}=p^1 \not \mid n! , and p 0 + 1 = p 1 p ! p^{0+1}=p^1 \mid p! . So, A p ( 0 ) = ( p 1 ) 1 + 1 = p 1 A_p(0)=(p-1)-1+1=p-1 . Why not n = 0 n=0 ? Notice, in the problem statement, n n is one of the positive integers (excluding 0), and this effect of n n being a positive integer on the value of A p ( 0 ) A_p(0) is chosen by design. Of course, if you change the domain of n n to the set of non-negative integers, then the value of A p ( k ) A_p(k) will be p p for k = 0 k=0 . Then their would be only 2 \boxed{2} distinct values of A p ( k ) A_p(k) .

We are just one-step behind to Completeness , which we can arrive in just by proving the fact that:

A p ( k ) A_p(k) is either 0 0 or p p for k 1 k\geq1 .

Let's prove it.

From the argument for [When A p ( k ) A_p(k) can be 0 0 ], we can see, A p ( k ) A_p(k) can be 0 0 for k 1 k\geq1 , since each of (a+1), (a+2), \ldots{ } \ldots{ } \ldots{ } and a + m 1 a+m-1 is greater than 1 1 (as a 0 a\geq0 . Now it'll suffice to show that: For k 1 k\geq1 , A p ( k ) 0 A p ( k ) = p A_p(k) \neq 0 \implies A_p(k)=p .

If A p ( k ) 0 A_p(k) \neq 0 implies there is a positive integer n n such that p k n ! p^k \mid n! but p k + 1 ∤ n ! p^{k+1} \not \mid n! . Now there arises two distinct cases.

  • CASE-I: n n is a multiple of p p : Then p k ∤ ( n 1 ) ! p^k \not \mid (n-1)! . But for each w w , with n w ( n + p 1 ) n\leq w \leq (n+p-1) , p k w ! p^k \mid w! but p k + 1 ∤ w ! p^{k+1} \not \mid w! , and p k + 1 ( n + p ) ! p^{k+1} \mid (n+p)! . So, A p ( k ) = ( n + p 1 ) n + 1 = p A_p(k)=(n+p-1)-n+1=p .

  • CASE-II: n n is NOT a multiple of p p :Then

p k ( n 1 ) ! p^k \mid (n-1)! . If n 1 n-1 is a multiple of p p , then the argument is reduced to CASE-I. If not, then

p k ( n 2 ) ! p^k \mid (n-2)! . If n 2 n-2 is a multiple of p p , then the argument is reduced to CASE-I. If not, then

\ldots{ } \ldots{ } \ldots{ }

\ldots{ } \ldots{ } \ldots{ }

\ldots{ } \ldots{ } \ldots{ }

p k ( n x ) ! p^k \mid (n-x)! ; now ( n x ) (n-x) is a multiple of p p , then the argument is reduced to CASE-I. As n p n\geq p whenever p k n ! p^k \mid n! but p k + 1 ∤ n ! p^{k+1} \not \mid n! for k 1 k \geq 1 , and for any prime p p and any positive integer n n , there is an x x , with 0 x < p 0\leq x<p , such that ( n x ) (n-x) is multiple of p p , we can be sure that ( n x ) (n-x) is a positive integer and thus, the factorial is defined.

That completes the proof:

There are 3 \boxed{3} distinct values of A p ( k ) A_p(k) , for any prime p p . The distinct values are: 0 , p 1 0, p-1 and p p .

So, A 2017 = 3 \boxed{|A_{2017}|=3} .

These are the right ideas. Can you focus on making the presentation cleaner / more concise?

For example, a lot of the argument revolves around "n, n+1, n-1, n+p" that was repetitively done up. This could be shortend into 1 explanatory paragraph.

Calvin Lin Staff - 4 years, 6 months ago

Log in to reply

I see. But that repeats only one times. And I can't decide how start to shorten this. Can't we leave this so?

Or any hint to do so, please?

Muhammad Rasel Parvej - 4 years, 6 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...