Less than prime

What is the sum of all integer values of n n satisfying 1 n 100 1 \leq n \leq 100 , such that n 2 1 n^2 - 1 is a product of exactly two distinct prime numbers?

Details and assumptions

The number 12 = 2 × 2 × 3 12= 2 \times 2 \times 3 is the product of 3 (not necessarily distinct) prime numbers. With reference to this question, 12 is not the product of exactly two distinct prime numbers.


The answer is 244.

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.

16 solutions

William Cui
Nov 18, 2013

First, we recognize that n 2 1 = ( n + 1 ) ( n 1 ) n^2-1 = (n+1)(n-1) . This factorization is very useful to know - remember it.

Since we need this value to be the product of two distinct prime numbers, we need both n + 1 n+1 and n 1 n-1 to be prime numbers. (Also, n 1 n-1 could be 1 and n + 1 n+1 could be a product of two prime numbers, but we can show that is not true, as 2 + 1 = 3 2+1=3 is not a product of two primes).

If we want n 1 n-1 and n + 1 n+1 to be primes, we are essentially looking a twin primes (primes that differ by 2). For example, 5 and 7 are twin primes, so 6 (the number between the two twins) would work.

The twin primes less than 100 are 3 and 5, 5 and 7, 11 and 13, 17 and 19, 29 and 31, 41 and 43, 59 and 61, and 71 and 73. So, the numbers that work are 4, 6, 12, 18, 30, 42, 60, and 72.

Adding these up, we have 4 + 6 + 12 + 18 + 30 + 42 + 60 + 72 = 244 4+6+12+18+30+42+60+72 = \boxed{244}

You should do this for a living.

Mareks Zevalds - 7 years, 6 months ago

Good explanation! Thank you! :)

Gift Son - 7 years, 6 months ago

OHHHHHHH<,> got all numbers but summed them incorrectly.

shivamani patil - 6 years, 7 months ago

Darn the proof writing I learned is way different than this. For example, you would NEVER write a proof like this on any proof writing competition (USA(J)MO, USAMTS, etc...). You would probably write something like Daniel Liu's solution, Tan Kiat's or mine.

Ryan Soedjak - 7 years, 6 months ago

Log in to reply

This is not supposed to be a 'proof', it is simply a solution to help others who did not solve the problem understand the problem better.

William Cui - 7 years, 6 months ago
James Aaronson
May 20, 2014

n 2 1 = ( n 1 ) ( n + 1 ) n^2 - 1 = (n-1)(n+1) , Observe that since ( n 1 ) = 1 (n-1) = 1 yields n = 2 n=2 , which does not work as 2 2 1 = 3 2^2 - 1 = 3 is not the product of 2 primes. Hence, we know that n 1 , n + 1 n-1, n+1 are integers greater than 1, and must thus both be prime. We simply need to add up all values of n such that (n-1) and (n+1) are both prime.

The values are 4, 6, 12, 18, 30, 42, 60, 72, with sum 244.

[Edits for clarity - Calvin]

This is the only solution which accounted for the case where one of the factors is 1, and checked that the other factor is not the product of 2 primes.

The numbers ( n 1 , n + 1 ) (n-1, n+1) are known as twin primes.

Calvin Lin Staff - 7 years ago
Jackal Jim
Nov 17, 2013

Analysis of Question When I first saw this question, the algebraic identity a 2 b 2 = ( a + b ) ( a b ) a^{2} - b^{2} = (a+b)(a-b) immediately comes into my head. Using that identity, n 2 1 n^{2}-1 simplifies into ( n 1 ) ( n + 1 ) (n-1)(n+1) . Since the question asks for a product of exactly 2 distinct prime numbers, both ( n 1 ) (n-1) and ( n + 1 ) (n+1) are prime. Note than 1 1 is not a prime. Hence, possible n n must be even, since all prime except 2 2 are odd.

Steps Using the list of prime , I easily found the numbers lying in between 2 2 primes:

4 , 6 , 12 , 18 , 30 , 42 , 60 , 72 4,6,12,18,30,42,60,72

Summing these numbers up, the answer is simply 244 \boxed{244} .

Shin-Wook Kang
May 20, 2014

n^2-1 = p(p+2) (p, p+2 : prime) i) p=2 -> p+2 : not prime ii) p=3 -> n=4 iii) except p=2 case, p is odd number. -> n is divided by 2. except p=3 case, p \equiv 1 \pmod{3} or p \equiv 2 \pmod{3} In case of p \equiv 1 \pmod{3}, p+2 is divided by 3, which is not prime. So, p \equiv 2 \pmod{3} then, n^2-1 = p(p+2), which means that n is divided by 3. -> n is divided by 6. There are sixteen integers which is divided by 6, smaller than 100.
Substitute n^2-1 = p(p+2). The case is 4, 6, 12, 18, 30, 42, 60, 72. The sum is 244.

Angus G
May 20, 2014

Observe that n 2 1 = ( n + 1 ) ( n 1 ) n^2-1=(n+1)(n-1) by the difference of two squares. Then n 2 1 n^2-1 is the product of exactly two distinct prime numbers if n + 1 n+1 and n 1 n-1 are both prime. Primes that satisfy this property (of being separated by 2) are known as twin primes . Luckily, there are only a few twin primes under 100: (3, 5), (5, 7), (11, 13), (17, 19), (29, 31), (41, 43), (59, 61), (71, 73). So we simply sum the integers n n that correspond to each of these twin primes to arrive at the answer.

Julia Vaughn
May 20, 2014

First, we notice that n 2 1 n^2-1 can be factored into ( n 1 ) ( n + 1 ) (n-1)*(n+1) . This implies that n must be an even number between a pair of twin (i.e. consecutive odd) primes.

There are 8 twin prime pairs less than 100--by the first number in the pair we have: 3, 5, 11, 17, 29, 41, 59, and 71.

Now, we just need to add the values of n which correspond to each pair: 4+6+12+18+30+42+60+72= 244

Tan Kiat
Nov 18, 2013

Consider n 2 1 n^2 -1 = ( n 1 ) ( n + 1 ) (n-1)(n+1) ,

Hence, we are actually finding 2 primes that have a difference of 2.

Consider https://brilliant.org/assessment/techniques-trainer/list-of-primes/

The set of pairs of prime numbers that fits the criteria are:

3 5 , 5 7 , 11 13 , 17 19 , 29 31 , 41 43 , 59 61 , 71 73 3*5 , 5*7 , 11*13, 17*19, 29*31, 41*43, 59*61, 71*73

Hence, the value of n n for each pair is their midpoint.

Thus, the value is calculated by 4 + 6 + 12 + 18 + 30 + 42 + 60 + 72 = 244 4 + 6 + 12 + 18 + 30 + 42 + 60 + 72 = \boxed{244}

Let p 1 p_{1} and p 2 p_{2} be two distinct prime numbers.

p 1 × p 2 p_{1} \times p_{2} = n 2 n^{2} - 1 , thus hold for some values of n

p 1 × p 2 p_{1} \times p_{2} = (n + 1)(n - 1)

Here we can say that : p 1 p_{1} = (n + 1) , p 2 p_{2} = (n - 1) or vice versa.

Equating both to n gives us n = p 1 p_{1} - 1 and n = p 2 p_{2} + 1

Thus,

p 1 p_{1} - 1 = p 2 p_{2} + 1

And finally, p 1 p_{1} - p 2 p_{2} = 2. This equation tells us that the possible distinct prime numbers have a difference of 2. So by looking at table of prime numbers, we get these set of prime numbers (3 , 5) , (5 , 7) , (11, 13) , (17, 19) , (29, 31) , (41, 43) , (59, 61) , (71, 73). (TAKE note that 1 ≤ n ≤ 100)

Ofcourse the values n are the even numbers between these sets of prime numbers. So, 4 + 6 + 12 + 18 + 30 + 42 + 60 + 72 = 244 \boxed{244}

Daniel Liu
Nov 17, 2013

We see that n 2 1 = ( n 1 ) ( n + 1 ) n^2-1=(n-1)(n+1) . Because the number can be factored into this, and we know that the number can be factored into exactly two distinct primes, therefore n 1 n-1 and n + 1 n+1 must be primes. Listing all primes from 1 100 1\rightarrow 100 , we see that the numbers 4 , 6 , 12 , 18 , 30 , 42 , 60 , 72 4,6,12,18,30,42,60,72 satisfy that both n 1 n-1 and n + 1 n+1 are primes. Our answer is therefore 4 + 6 + 12 + 18 + 30 + 42 + 60 + 72 = 244 4+6+12+18+30+42+60+72=\boxed{244} .

What about 10?

Kathi Allphin - 7 years, 6 months ago

Log in to reply

Whoops...I caught my mistake - 9 isn't prime.

Kathi Allphin - 7 years, 6 months ago
Jun Wang
Nov 17, 2013

since n^2-1=(n+1)(n-1) this problem is equivalent to finding "twin primes", manually count twin primes (prime numbers who are only 2 apart), we have 8 pairs.

Ryan Soedjak
Nov 17, 2013

Since n 2 1 n^2-1 can be factored as ( n 1 ) ( n + 1 ) (n-1)(n+1) , the problem is reduced to finding the number of twin primes ( a , a + 2 ) (a,a+2) with a 100 a\le100 . Brilliant conveniently has a list of the first 1000 primes , so we find that n = 4 , 6 , 12 , 18 , 30 , 42 , 60 , 72 n=4,6,12,18,30,42,60,72 work. Our answer is then 4 + 6 + 12 + 18 + 30 + 42 + 60 + 72 = 244 4+6+12+18+30+42+60+72=\boxed{244} .

Ben Haffner
May 20, 2014

If n is an integer, then n^2-1 must be an integer as well.

Note that n^2-1 can be factored into (n+1)(n-1). These two numbers must be integers as well. We are told that n^2-1 is the product of exactly two prime integers. Putting the two previous statements together, we find that (n+1) and (n-1) must both be those two prime integers. This means that we need to find all the pairs of twin primes (primes which differ by two) under 100. The list of twin prime pairs under 100 is as follows:

(3,5) (5,7) (11,13) (17,19) (29,31) (41,43) (59,61) (71,73)

For these numbers n+1 and n-1, the respective values of n are 4, 6, 12, 18, 30, 42, 60, and 72. Adding all of these up, we arrive at 244.

Saurabh Mallik
Mar 26, 2014

The numbers which satisfy the condition of the question are as follows:

4 2 1 = 15 ( 2 × 3 ) 4^{2}-1=15 (2 \times 3)

6 2 1 = 35 ( 5 × 7 ) 6^{2}-1=35 (5 \times 7)

1 2 2 1 = 143 ( 11 × 13 ) 12^{2}-1=143 (11 \times 13)

1 8 2 1 = 323 ( 17 × 19 ) 18^{2}-1=323 (17 \times 19)

3 0 2 1 = 899 ( 29 × 31 ) 30^{2}-1=899 (29 \times 31)

4 2 2 1 = 1763 ( 41 × 43 ) 42^{2}-1=1763 (41 \times 43)

6 0 2 1 = 3599 ( 59 × 61 ) 60^{2}-1=3599 (59 \times 61)

7 2 2 1 = 5183 ( 71 × 73 ) 72^{2}-1=5183 (71 \times 73)

So the values of n which satisfy this condition are 4 , 6 , 12 , 18 , 30 , 42 , 60 4, 6, 12, 18, 30, 42, 60 and 72 72 .

Sum of integers = 4 + 6 + 12 + 18 + 30 + 42 + 60 + 72 = 4 + 6 + 12 + 18 + 30 + 42 + 60 + 72 = 244 \boxed{244}

244 \boxed{244} is the answer!

Saurabh Mallik - 7 years, 2 months ago

Can somebody help me find solutions to this question?

Anagram Cracker!!

Anagrams are problems related to shuffled letters which are needed to be arranged and made into perfect meaningful sentences without repeating the letters (letters can be used only once).

Here are some anagrams which you need to crack:

1) tuteauaewribeifslh

2) geaperioitrdspawsagnhabineod

3) enaednenetorfyimrw

Remember to arrange and make a meaningful sentence (one sentence from each group of letters), not single word. If you are able to solve this anagrams please inform me the answers as well as how you found the solutions to the anagrams.

Details and assumptions:

Example:

"My name is Anil" can be written in the form of group of letters as:

meailaysmnni

Saurabh Mallik - 7 years, 2 months ago
Anis Abboud
Nov 21, 2013
  • n 2 1 = ( n 1 ) ( n + 1 ) n^2 - 1 = (n-1)(n+1) , so
  • Go over the primes up to 100: http://www.miniwebtool.com/list-of-prime-numbers/?to=100
  • Find consecutive pairs that the difference between them is 2. (n is the number between them.)
  • So the possible values for n are: 4 + 6 + 12 + 18 + 30 + 42 + 60 + 72 = 244 4+6+12+18+30+42+60+72 = \boxed{244} .
Abrar Nihar
Nov 17, 2013

n 2 1 = ( n 1 ) ( n + 1 ) n^2 - 1 = (n - 1)(n + 1)

So, according to the question, ( n + 1 ) (n+1) and ( n 1 ) (n-1) are primes... Since, they are almost consecutive, they must be twin primes... All we need to find is all pairs of twin primes below 100 100 ...

A little observation will find these pairs: ( ( n 1 ) , ( n + 1 ) ) = ( 3 , 5 ) , ( 5 , 7 ) , ( 11 , 13 ) , ( 17 , 19 ) , ( 29 , 31 ) , ( 41 , 43 ) , ( 59 , 61 ) , ( 71 , 73 ) \left((n-1),(n+1)\right) = (3, 5), (5, 7), (11, 13), (17, 19), (29, 31), (41, 43), (59, 61), (71, 73)

So, the values of n are: 4 , 6 , 12 , 18 , 30 , 42 , 60 , 72 4, 6,12, 18, 30, 42, 60, 72

The sum is: 244 \fbox{244}

David Treeby
Nov 17, 2013

Since n 2 1 = ( n 1 ) ( n + 1 ) n^{2}-1=(n-1)(n+1) is the product of two primes, each of n 1 n-1 and n + 1 n+1 is a prime number. And since these differ by 2, these must be prime pairs no greater than 100. A complete list of these is ( 3 , 5 ) , ( 5 , 7 ) , ( 11 , 13 ) , ( 17 , 19 ) , ( 29 , 31 ) , ( 41 , 43 ) , ( 59 , 61 ) , ( 71 , 73 ) . (3,5),(5,7),(11,13),(17,19),(29,31),(41,43),(59,61),(71,73). Solving for n n in each instance and then summing the result gives a total of 244 \boxed{244} .

Okay I did it wrong! Had considered 89 to be a prime!

Now can someone tell me, how may I proceed to the next level??

Satyaki Dutta - 7 years, 6 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...