find the prime factors of a number

Solutions on MaxInterview for find the prime factors of a number by the best coders in the world

showing results for - "find the prime factors of a number"
Ford
19 Aug 2016
1>>> for n in range(2, 10):
2...     for x in range(2, n):
3...         if n % x == 0:
4...             print(n, 'equals', x, '*', n//x)
5...             break
6...     else:
7...         # loop fell through without finding a factor
8...         print(n, 'is a prime number')
9...
102 is a prime number
113 is a prime number
124 equals 2 * 2
135 is a prime number
146 equals 2 * 3
157 is a prime number
168 equals 2 * 4
179 equals 3 * 3
18
Lucia
26 Sep 2019
1public List<Integer> factorsOf(int n) {
2  ArrayList<Integer> factors = new ArrayList<>();
3
4  for (int d = 2; n > 1; d++)
5    for (; n % d == 0; n /= d)
6      factors.add(d);
7
8  return factors;
9}
10
queries leading to this page
optimzed way to find prime factors of a numbercount prime factors of a numberprime factors of a number calculatorsum of all prime factors of a numberprime factors programwhat is meant by prime factors of a numberprogram to find prime factors of a numberco factors of a prime numbercalculate prime factors of a numberprime factors meansalgorithm for finding count of prime factors of a numberthe total number of factors of prime number ishow to find the amount of prime factors of a numberno of prime factors of a numberprime number of factors of a given numberwhich factors are not included in the prime factorization of a composite numberthe factors of a prime number are the number itself andsum of prime factorshow to know the number of a prime factors of a number find the prime factors of a numberprogram to calculate prime factors of a numberprime factors of the given numberfind the prime factors of 957prime factors ofdetermine prime factorsprime numbers have how many factorsnumber of all prime factors of a numberfastest way to find prime factors of a numberhow to find two prime factors of a number which when added gives the numberfind out prime factors of given numberprime factors of a unumberhow to find prime factorshow to get prime factors of a numbernumber of prime factorstotal of prime factors of numberall prime factors of a numbers find prime factors of a number gfgcalculate all prime factors of a numberprime factors of numberswhat are the prime factors of 100program to get prime factors of a numberprint prime factors of a numberprime factors of number 198prime factors gfgtrick to find the number of prime factors of a numberhow many prime factors are thereprogram to find sum of prime factors of a numberhow to find prime factors of a large numberhow to calculate prime factorsfinding prime factors of numberget all prime factors of a prime numbertips to find prime factorsprime factors of noget prime factors of a numberreturn the sum of the prime factors of a numberhow to find number of prime factorsdefine a function to print the prime factors of a number prime factors of 531441how todfind prime factors of a numberhow many factors a prime number hasfactorises a number into its prime factorshow to find the sum of prime factors of a numberprime factors definitionprime factors of numbers onlinegenerating all prime factors of a number amount of prime factors for number n2 the total number of factors of prime number isfactors and prime factorshow to find two co prime factors for the number in efficient wayprime factors of 6 2cfinding prime factorsprogram to print factors of a numberproduct of all prime factors of a numbercalculate number of prime factorsfind the total number of primes factorshow to find the prime factors of a numberfind the sum of prime factors of a given integerprime factors of numbercount of prime factors of a numbernumber of most prime factorsfind all prime factors of a numbercalculate number of prime factors programwrite a program to find prime factors of an integer 3fformula to find prime factors of a numberprime number of factorsfind how many prime factors of a numberhow to find factors of a numberall prime factors of a numberfind prime factors of numberfind prime factors of a numberfactors of prime numbershow to find prime factors of a numberfind prime factors in factorialfind prime factorshow to find all the prime factors of a numbermaximum number of prime factors of a numbertotal prime factors inhow to work out prime factorsprime factorshow to calculate prime factors of a numberexamples of prime factorsprime factors and prime numbers relationshipdefine prime factorsfind prime factors of a number onlinehow to find how many prime factors a number hashow could you find all prime factors of a number 3fprogram to find two prime factors of a numberwhat are the prime factors of the greatest 4 e2 80 93digit number 3fhow to find prime factors of a noprime factors prpgramprogram to find number of prime factorshow to write prime factors of a numberhow many prime factors can a number havedefine a function to print the prime factors of a numbernumber of prime factors of 93489348get all prime factors of a numberwhat is prime factorscode to find prime factors of a numberfind sum of prime factors of a numberprime factors of number countnow of prime factors of a numberprime factors of a given numberprime factors algorithmhow to check factors of primeshow to find prime factors of a number easilynumber of ways to arrange prime factorsprime factors of factorialstotal number of prime factors formulaprime factors of a number functionprogram to calculate number of prime factors of a numberalgorithm to find factors of a numberfind all the prime factors of a numbernumbers with one prime factorssum of prime factors of a number codenumber of prime factors of a numberget prime factors of a number onlinewhat are the prime factors of 2ho to find all prime factors of a number efficiently 3fdisplay prime factors of a numberfind prime factors of given numberscalculate the prime factors of a number and display them prime factors of a nmberprime factors for a numberfind number of factors in prime factorizationprime factors program explanationtotal number of factors of a prime numberget greated prime factors of a numberproducts of the prime factors of a numberhow to get the nubmer of prime factors of a number in consttant timegetting prime factors of a numberwhat are prime factorswhat are prime factors of a numberthe total number of prime factors isprints all the prime factors of the number nfind the prime factors of 27finding the prime factors of a numberfind the prime factors of a numberprime factors of number onlinefind number of prime factorscompute the prime factors of a given natural numberfind number of factors of a numberhow can you find the total factors by knowing all the prime factors of a nowrite a program to find all prime factors of a number prime factors meaningnumbers having prime factorsget prime factors of a number run timehow to get the prime factors of a numberto find prime factors of a numberhow to calculate the number of prime factors of a numbernumber to prime factorswhat are the prime factors of 14sum of prime factors of a numberwrite a program to compute factors of a number n using prime factorization method program to find all prime factors of a numberhow to store prime factors of a numberhow to get all prime factors of a numberprime factors mathwhat prime factors generate prime factors of a given integerprime factors of a number in prime factorization method can be found howalgorithm to find prime factors of a numberfind the product of the prime factors of a numberfinding all the factors of a numberformula to count number of prime factors of a numberprime factors codewrite a function to obtain prime factors of given numberno of prime factors of numbersprime factors of a numberfinding prime factors of a numberwhich factors are not included in the prime number factorization of a composite number 3fnumber of factors using prime factorizationhow to find all factors of a number using prime factorizationalgorithm for finding prime factors of a numberprogram to get all the prime factors of a numbersno of prime factorsdefine prime factors of a numberfind prime factors of a number algorithmfind the prime factors of a given numberprime factors numberfind the prime factors of a number