Find the sum of all primes of the form p = n n + 1 , where p < 1 0 1 9 and n is a positive integer.
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.
These are known as Sierpiński Numbers of the First Kind.
Note if we don't restrict the upper bound of p this is an open question. The full list of primes (the ones given in this answer) have only been confirmed for p less than 1 0 3 ( 1 0 ) 2 0 .
Further information here. (External link.)
BRO 2+5+257=264
Log in to reply
It's typo. I have fixed it. Thanks !!
Log in to reply
The boxed text currently reads 1+5+257=264, so I guess you haven't fully fixed it.
Log in to reply
@Roland van Vliembergen – oh! My bad . Thanks I have fixed it now. :)
Why must n be in the form of 2^k?
Log in to reply
I have changed the solution. If it n isnot I'm form of 2^k then the n^n+1 is a composite .
Why you shouldn't take n=12 to solving the primes?
Why are we not working with 2,4,8 and not with 2,4,6,8????
using M a t h e m a t i c a
#^#+1&/@Select[Range@19,PrimeQ[#^#+1]&]
returns {2, 5, 257}
Thank you Mike. That is very very helpful for me. Cheers, Michael
hahaha good meme
For n = 1 and n = 2 , we get primes. An odd n > 1 yields an even n n + 1 > 2 . So n must be even, i.e n = 2 2 t ( 2 k + 1 ) .
Since 2 2 t + 1 ∣ ∣ ∣ ∣ 2 2 t ( 2 k + 1 ) + 1 , the exponent of n cannot have an odd divisor. Thus n + 2 2 t or n n = ( 2 2 t ) 2 2 t . For t = 0 , 1 we get n n + 1 = 5 , 2 5 7 , but when t = 2 , p = 1 6 1 6 + 1 = 2 6 4 + 1 > 1 6 ⋅ 1 0 0 0 6 + 1 > 1 0 1 9 . So there are no other primes besides 2 , 5 , 2 5 7 .
@Anmol Jain Kindly use latex as it is disturbing to understand such answers otherwise......
Log in to reply
BRO IT WILL CONSUME ALOT OF MY TIME
Log in to reply
But without it your statement will be ignored by most ....and press the caps lock button once please.
Log in to reply
@Anurag Bisht – BRO TODAY YOU WILL TEACH ME HOE TO WRITE A SOLUTION IN FIITJEE OK
Log in to reply
@Anmol Jain – Just write latex in your brilliant search bar.....you will get all formulas....see them and type...its easier than remembering
Log in to reply
@Anurag Bisht – THANKS FOR ENLIGHTENING MY MIND
Log in to reply
@Anmol Jain – Capslock............
Log in to reply
@Anurag Bisht – Thanks is it ok now sir?
Log in to reply
@Anmol Jain – Yes, My Lad.
Log in to reply
@Anurag Bisht – Bro why don't we make a class and add all good students of our school
Let me rewrite his solution: For n = 1 and n = 2 , we get primes. An odd n > 1 yields an even n n + 1 > 2 . So n must be even, i.e n = 2 2 t ( 2 k + 1 ) .
Since 2 2 t + 1 ∣ ∣ ∣ ∣ 2 2 t ( 2 k + 1 ) + 1 , the exponent of n cannot have an odd divisor. Thus n + 2 2 t or n n = ( 2 2 t ) 2 2 t . For t = 0 , 1 we get n n + 1 = 5 , 2 5 7 , but when t = 2 , p = 1 6 1 6 + 1 = 2 6 4 + 1 > 1 6 ⋅ 1 0 0 0 6 + 1 > 1 0 1 9 . So there are no other primes besides 2 , 5 , 2 5 7 .
Log in to reply
But I don't know why if n is even then n = 2 2 t ( 2 k + 1 ) , isn't it n = 2 t ( 2 k + 1 ) ?
In general n^n+1 can only be prime if n is a tower exponent of 2s so n=1,2,2^2 and they all work here.
Log in to reply
Is there a proof that n must be a tower exponent of 2s in order for the expression to be prime?
Log in to reply
Sorry I was wrong in my statment, l can only proof that n must be of the form 2^2^k (wich is the same thing in the Interval (0,10^19) and is what Naren Bhandari has already proved).
Why only tower of two
Factorise n in prime factors and separate it into two parts: the powers of 2 and the rest: n = 2 m ( 2 r + 1 ) , where m and r are non-negative integers.
n n + 1 = n 2 m ( 2 r + 1 ) + 1 = ( n 2 m ) 2 r + 1 + 1 2 r + 1
This result is in the form A s + B s which is divisible by A + B for odd s .
The only way that there is a possibility for n to be prime, is if the divisor equals n or r = 0 .
So n = 2 m .
m = 0 ⟹ n = 1 ⟹ n n + 1 = 2 which is prime 1.
If m > 0 , then also 'separate' m : m = 2 t ( 2 u + 1 ) leading to n n + 1 = ( 2 2 t ( 2 u + 1 ) ) 2 2 t ( 2 u + 1 ) + 1 = 2 2 t ( 2 u + 1 ) 2 2 t ( 2 u + 1 ) + 1 = ( 2 2 t 2 2 t ( 2 u + 1 ) ) 2 u + 1 + 1
Again, this can only be prime if u = 0 . Therefor, n = 2 2 t are the only candidates.
t = 0 ⟹ n = 2 ⟹ n n + 1 = 5 (prime 2)
t = 1 ⟹ n = 4 ⟹ n n + 1 = 2 5 7 (prime 3)
t = 2 ⟹ n = 1 6 ⟹ n n + 1 = 1 6 1 6 + 1 = 2 6 4 + 1 > 2 4 2 6 0 = 1 6 ( 2 1 0 ) 6 = 1 6 ∗ 1 0 2 4 6 > 1 6 ∗ 1 0 1 8 > 1 0 1 9 so we are done finding candidates.
Final answer 2 + 5 + 2 5 7 = 2 6 4 .
Here is my approach: First observe that n = 1 is a trivial solution. Suppose, n > 1 .It is also easy to see that n must be even
Claim 1: n is a power of 2
We prove this by contradiction. It is known that n is even, so let n = 2 t c for some integer t and an odd number (greater than 1 ) c . Then,
n n + 1 = ( 2 t c ) 2 t c + 1 = ( ( 2 t c ) 2 t ) c + 1
Since c is odd, ( 2 t c ) 2 t + 1 is a divisor of the above number, and hence it's not a prime. This proves our first claim.
Claim 2: n is a Fermat prime This was proved by Fermat himself that if a number of the form 2 k + 1 is a prime, then k is a power of 2 . (The proof of this is similar to the above one). Fermat number ( F n ) is a number of the form 2 2 n + 1 . Thus F 0 = 3 , F 1 = 5 , F 2 = 1 7 , F 3 = 2 5 7 , F 4 = 6 5 5 3 7 and so on. Since F 6 > 1 0 1 9 we have to consider only F 0 , F 1 , F 2 , F 3 , F 4 , F 5 . F 5 is a composite number. (This was proved by Euler).
We have shown that n is a power of 2 . i.e. n = 2 k for some positive integer k . Thus, n n + 1 = ( 2 k ) 2 k + 1 = 2 k 2 2 k + 1 Since this must be a Fermat prime, k 2 k = 2 t for some integer t . Checking all the cases, we see ( k , t ) = ( 1 , 1 ) , ( 2 , 3 ) are the only solutions. Thus the sum of all such numbers is 2 + F 1 + F 3 = 2 + 5 + 2 5 7 = 2 6 4
actually without involve fermat prime numbers, it can be showed that also n=8 doesn't give a prime number,
When p=2,5 with n=1,2,they're obviously prime.And we can easily notice that n^n+1 is always even when n is odd,so the odd numbers except 1 are all eliminated.
In fact,because 2^10=1024>10^3,we can know that 16^16=(2^4)^16=(2^10)^6 2^4>10^18 10=10^19,with which we know n<16.
Now comes the key part ,to shrink the range the last time,we can use a equality of factorization as below.
When k is an odd number, we have
n^k+1=(n+1)(n^(k-1)-n^(k-2)+n^(k-3)-…-n+1)
So 6^6+1=(6^2)^3+1,8^8+1 =(2^8)^3+1,10^10=(10^2)^5+1,12^12=(12^4)^3+1,14^14=(14^2)^7+1 out at the same time.
And examine 4^4+1 in the end,we get the answer 2+5+257=264
Suppose n = m k for odd integer m > 1 . Then n n + 1 = n m k + 1 = ( n k + 1 ) ( n ( m − 1 ) k − n ( m − 2 ) k + … + 1 ) , so in order for n n + 1 to be prime, n cannot have an odd divisor greater than 1 . Thus, n must be a power of 2 , so let n = 2 k . Then n n + 1 = 2 k 2 k + 1 . By a similar argument, k cannot have any odd divisors greater than 1 , and thus must also be a power of 2 (or k = 0 ). If k = 2 s , then n n + 1 = 2 2 s + 2 s + 1 .
Thus, if this quantity is prime, then in particular it is a Fermat prime. Only 5 Fermat primes are known: 3 , 5 , 1 7 , 2 5 7 , and 6 5 , 5 3 7 . Only 2 have the specified form, namely 5 and 2 5 7 . Since k could be 0 , we also have n = 1 ⟹ n n + 1 = 2 is another solution. Therefore, the answer is 2 + 5 + 2 5 7 = 2 6 4 .
Let's write some code! Python's the best language for this problem since it can easily handle big numbers, and 10^19 is just barely large enough to be annoying for most languages (In java you could use BigInteger but in some languages you'll just have to make your own structure D:)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
Problem Loading...
Note Loading...
Set Loading...
My approach
We notice that for n = 1 , 2 p = 2 , 5 which are obviously the prime numbers . Further we have that p < 1 0 1 9 ⟹ n n + 1 < 1 0 1 9 . Taking lo g on both sides we get that lo g ( 1 0 1 9 ) lo g ( n n + 1 ) > 1 for n = 1 6 and lo g ( 1 0 1 9 ) lo g ( n n + 1 ) < 1 for n = 1 5 . Thus, the range of n is 1 ≤ n < 1 6 . .
If n = k b where k is an odd number greater than 1. Then n n + 1 = ( n b ) k + 1 is divisible by n b + 1 ( by factorization ) of a n + b n . Hence we arrived that n must be an even number.
Let n = 2 l and primes number are expressed as 2 k 1 + 1 = n n + 1 ⟹ l = 2 2 l 2 k 1 . This must be in form power of 2 if not then n n + 1 is composite. Working out with 2 , 4 , 8 . Only n = 2 , 4 are possible values. Hence , the required primes we have 1 1 + 1 , 2 2 + 1 , 4 4 + 1 . Hence , the sum of primes we have is 2 + 5 + 2 5 7 = 2 6 4 .
Note 8 doesn't work since 8 8 has odd divisors in it power tower.