Find the largest of the three prime factors of 9 6 + 1 .
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.
Nice one ! +1
How did you check that 6481 is a prime?
Log in to reply
In the question it has been specified that the number can be expressed as a product of three primes, two I have found as 2 and 41, 3rd must be 6481. If not convinced, you may find its factors :D
I agree with Rishabh, that the question as asked means you don't really have to check it. But if you had to, you only need to check the primes less than 81. And that isn't so daunting.
Brute force approach; find the square root of 6481 and divide each integer less than that by 6481 to see if it divides.
here in this problem we have to find g r e a t e s t p r i m e f a c t o r of the expression: 9 6 + 1 9 6 + 1 = ( 9 2 ) 3 + 1
now as we know that a 3 + b 3 = ( a + b ) ( a 2 − a b + b 2 ) so apply this result in above equation, which gives
8 1 3 + 1 = ( 8 1 + 1 ) ( 8 1 2 − 8 1 + 1 ) = 8 2 × 6 4 8 1 which can also be written as 2 × 4 1 × 6 4 8 1
so the correct answer is 6 4 8 1
Hint: a 3 + b 3 = ( a + b ) ( a 2 + b 2 − a b ) .
using python :
def max_prime_factor(n):
largest_factor = 1
i = 2
while i * i <= n:
if n % i == 0:
largest_factor = i
while n % i == 0:
n //= i
i = 3 if i == 2 else i + 2
if n > 1:
largest_factor = n
return largest_factor
print max_prime_factor(9**6+1)
Problem Loading...
Note Loading...
Set Loading...
9 6 + 1 = ( 9 2 ) 3 + 1 3 = ( 9 2 + 1 ) ( 9 4 + 1 − 9 2 ) ( U s i n g a 3 + b 3 = ( a + b ) ( a 2 + b 2 − a b ) ) = ( 8 2 ) ( 9 2 ( 9 2 − 1 ) + 1 ) = 2 × 4 1 × 6 4 8 1 (Product of three primes) Greatest of them= 6 4 8 1