0

If I have any number, for example, $120$

The prime factorisation of $120$ being: $$2 × 2 × 2 × 3 × 5$$

Then, is there an easy way that I can find out that the number $120$ has a repeated factor (i.e., the number $2$ occurs three times in the prime factorization of $120$), without factorizing the number $120$?

Sathvik
  • 3,609
CCS
  • 143
  • 1
    Did you choose $120$ because you were looking for the highest power of $2$ in $5!$ ? – Sathvik Jun 02 '21 at 09:27
  • @SathvikAcharya i just chose 120 because it had a repeated prime factor – CCS Jun 02 '21 at 09:28
  • 1
    The reason I asked about your choice was this – Sathvik Jun 02 '21 at 09:30
  • 1
    For the general case, see this question over on MO. TL;DR, it doesn't seem to be easy. – Milten Jun 02 '21 at 09:30
  • 4
    From the wiki on square-free integers: "In particular, there is no known polynomial-time algorithm for computing the square-free part of an integer, or even for determining whether an integer is square-free." – Milten Jun 02 '21 at 09:37
  • A number $abcd$ where variables are digits will have two or more $2$s in the factorization if $cd$ is a multiple of $4$. There will be two or more $3$s if $a+b+c+d$ is a multiple of $9$. – Mathemagician314 Jun 02 '21 at 09:40
  • There is no better way , apart from special cases like powers of $2$ or $5$ for which we only need the last digits , but repeated division is anyway a cheap operation. – Peter Jun 04 '21 at 09:43

0 Answers0