For any prime number $p$, let $A_p$ be the set of integers $d\in \{1,2,\dots, 999\}$ such that the power of $p$ in the prime factorization of $d$ is odd. Then what is the cardinality of $A_p$?

I have used to the following result, but failed to show the required result.
The largest exponent $e$ of a prime $p$ such that $p^e$ is a divisor of $n!$ is given by $$ e=\left\lfloor \dfrac{n}{p} \right\rfloor + \left\lfloor \dfrac{n}{p^2} \right\rfloor + \left\lfloor \dfrac{n}{p^3} \right\rfloor $$
How can I do next?

  • $\begingroup$ If I've understood correctly, we have $|A_p|=0$ for $p>999$, right? $\endgroup$ – Sambo Aug 16 '18 at 20:29
  • $\begingroup$ Please concoct a relevant title. $\endgroup$ – Did Aug 16 '18 at 21:55

The number of integers less than or equal to $n$ and divisible by $d$ is $\lfloor n/d \rfloor $. You need to count the number of integers divisible by $p$, minus the number of primes divisible by $p^2$, and so on...


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.