Find the smallest prime number N such that the following is true:
The largest prime factor of
N
−
1
is
A
;
The largest prime factor of
A
−
1
is
B
;
The largest prime factor of
B
−
1
is
7
.
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.
Starting with B , since B − 1 has its highest prime factor as 7 , B can be written as B − 1 = 7 n or B = 7 n + 1 … ( 1 ) . Similarly for A , A = B m + 1 … ( 2 ) and N = A p + 1 … ( 3 ) .
Considering equation ( 1 )
We know that B is prime, then n should be even.This is the condition, and the value of n should be such that B is prime. Considering the vlaues of n , n = 2 , B = 1 5 not a prime.
n = 4 , B = 2 9 prime,
n = 6 , B = 4 3 prime,
n = 8 , B = 5 7 not a prime,
n = 1 0 , B = 7 1 prime.
But since they have asked the smallest prime number N , lets consider B = 2 9 (smallest value of B) : A = 2 9 m + 1 where m is an even natural number such that A is prime. When
m = 2 , A = 5 9 prime.
m = 4 , A = 1 1 7 not a prime.
so, considering A = 5 9 : N = 5 9 p + 1 where p is an even natural number such that N is prime. when
p = 2 , N = 1 1 9 , not prime,
p = 4 , N = 2 3 7 not prime,
p = 6 , N = 3 5 5 not prime
p = 8 , N = 4 7 3 not prime
p = 1 0 , N = 5 9 1 not prime
p = 1 2 , N = 7 0 9 prime.
So, when B = 2 9 we get the value of N to be 7 0 9 .
Now, when B = 4 3 (next value of B) : A = 4 3 m + 1 , using the similar procedure we find that ,
m = 2 , A = 8 7 not prime.
m = 4 , A = 1 7 3 which is the smallest value of A being prime.
So, for A = 1 7 3 : N = 1 7 3 p + 1
The prime values of N is for
p = 2 , N = 3 4 7 which is prime.
So, we got value of N which is prime and smaller than 7 0 9 . Now, consider B = 7 1 , then value of A will be for
m = 2 , A = 1 4 3 which is not a prime.
m = 4 , A = 2 8 5 not a prime.
We can see that all the further taken for A will give a value of N larger than 3 4 7 . This also true for further value of B
From this we can come to the conclusion that 3 4 7 is the smallest prime number with the above property or condition. So, the answer is N = 3 4 7
One has to justify that 347 is the smallest possible. The vague phrase "We can see that all the further taken for A will give a value of N larger than 3 4 7 . This also true for further value of B " does not qualify as a mathematical justification. Not being able to fill in this crucial detail was a very common mistake. Another mistake was accidentally missing the case B=29 altogether, thus getting the right answer for the wrong reasons.
Summarize the information given in 3 equations and several conditions as follows:
1) N-1=A
a
2) A-1=B
b
3) B-1=7*n
And the conditions are: a,b,n are positive integers; N,A,B are prime.
Starting from equation 3), rearrange this to get:
4) B=7*n+1
Now find the multiples of 7 then add 1 to each:
7*1+1=8
7*2+1=15
7*3+1=22
7*4+1=29
7*5+1=43
7*6+1=43
You do this until you find a prime (since B needs to be prime). As you will notice there are multiple primes, try the smallest first and then the following ones, with the following method:
Using B=29. (7*4+1=29)
Repeat the same process for B=29 using:
5) A=B*b+1
Therefore:
29*1+1=30
29*2+1=59
And 59 is the lowest prime you can make with equation 7), therefore A=59.
For the final step rearrange equation 1):
6) N=A*a+1
Therefore:
59*1+1=60
59*2+1=119
59*3+1=178
59*4+1=237
59*5+1=296
59*6+1=355
. . .
59*12+1=709
This is the lowest value for N you can get with B=29. At first glance it may seem that this has to be the lowest possible value for N, since the lowest possible value for B has been used. However there is the possibility that another value for B will yield a lower value for N.
Therefore, you must repeat the same process for greater values of B as well.
Starting with B=42 (from B=7*6+1) N=347, which is the correct answer.
Note: to be sure you should try every prime number, B, resulting from B=7*n+1. You only have to try values for n up to 35 since after that the resulting values of N would be greater than 1000.
Using Python 2.7.4
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
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
while True:
if isPrime(n):
A=max_prime_factor(n-1)
B=max_prime_factor(A-1)
if max_prime_factor(B-1)==7:
print n
break
n+=1
B=7t+1 (t is smallest product of prime numbers that make B a prime no.) thus if t=6, B=43 now A=43m+1 (") thus if m=4,A=173 which is a prime no. now N=173k+1 (") thus if k=2,N=347
Basically, we must first realise that all N, A, and B are prime numbers. To find the smallest possible prime number N, we are inclined to think that A and B are also at the minimum.
B can be expressed in the form of 7p+1. The smallest prime number that fits into this condition would be 43. Hence B is 43.
We then substitute B as a factor of A-1, so A is expressed as 43q+1. By listing, we will find that 347 is the smallest value that is a prime number. Therefore, N has a value of 347.
The first statement tells us that A must be a prime number and the second statement that B is also a prime number. Now the solution must be worked from last statement,i.e, largest prime factor of B-1 is 7, it means that 7 x+1=B (A MULTIPLE OF SEVEN PLUS ONE IS A PRIME NUMBER), where x is a natural number. Since we have to deal with smallest of numbers in this problem, the smallest possibility of B is 43. Now, similarly for the second statement, 43 y+1=A, and from the table of prime numbers, we get to know that the smallest possibility of A is 173. similarly for the first statement, 173*z+1=N, and the smallest possibility in this case is 347, which is N. Hence the answer, N=347
7 has to be a prime factor of B-1. So B can be written as 7b+1. B is the largest prime divisor of A-1, so b has to be an even number and b has to be less than 7, since 7 is the largest prime factor of B-1. For b is 4 B equals the prime number 29. For b = 6 B = 43
Suppose B = 29 is a prime divisor of A-1, then A can be written as 29a + 1 with a less than 29. For a = 2 A = 59, for a = 8 A = 233 and for a = 12 A = 349. Suppose B = 43 then A might be equal to 173 or 431. Since the answer N = An + 1 has to be less or equal 999, larger prime divisors then 499 are irrelevant.
If 59 is the largest prime factor of N-1, then N can be written as 59n + 1. For N a prime number the smallest number of n has to be 12, then N = 709. If 233 is the largest prime factor of N-1, then N = 233n + 1. The smallest number of n then is 2, and N = 467, which is smaller than 709. But if B = 173 then N = 173n + 1 with smallest n equals 2 provides N = 347. Which has to be the smallest prime number since all other options are excluded.
Problem Loading...
Note Loading...
Set Loading...
We will first obtain the answer, and then justify it.
Because 7 is a factor of B − 1 , B = 7 k + 1 . Note that because B is prime and greater than 2 , k must be even. Checking for primality, B can be 2 9 , 4 3 , 7 1 , 1 1 3 , … .
If B = 2 9 , then likewise A = 2 9 k + 1 where k is even. The smallest few possible A are 5 9 , 2 3 3 , 3 4 9 , … .
If B = 4 3 , then likewise A = 4 3 k + 1 where k is even. The smallest few possible A are 1 7 3 , 4 3 1 , … .
If B = 7 1 , then likewise A = 7 1 k + 1 where k is even. then the smallest possible A is 5 6 9 , … .
So A = 5 9 , 1 7 3 , 2 3 3 , … are the values that are at most 347. If A = 5 9 , then the smallest possible N is 7 0 9 . If A = 1 7 3 , then the smallest possible N is 3 4 7 . If A = 2 3 3 , then the smallest possible N is 4 6 7 . So it seems like the smallest value of N is 3 4 7 .
To prove that 347 is the smallest possible, suppose that N is smaller. Because A ≤ 2 N − 1 , we have A ≤ 2 3 4 5 − 1 = 1 7 2 , so A ≤ 1 7 1 . This implies B ≤ 8 5 . But we already checked all B and A in this range when we backtracked from 7 to find our answer.
So the final answer is 3 4 7 .