Check your Number Theory Skills

Let S S be the set of positive integers n n for which n 2 1 n^2-1 is a product of three different primes. Compute the product of the five smallest elements of S S .

You can try more of my Questions here .


The answer is 3153920.

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.

2 solutions

If for a positive integer n the number n 2 1 n^{2}-1 is a product of three different primes, then (in view of 2 2 1 = 3 2^{2} -1 = 3 ) we have n > 2. Next, in view of the identity n 2 1 = ( n 1 ) ( n + 1 ) n^{2}-1 = (n-1)(n+1) , the number n must be even since otherwise the factors on the right-hand side would be even, and 2 2 n 2 1 2^{2}|n^{2}-1 .

Moreover, the numbers n -1 and n + 1 (which are both > 1 since n > 2) cannot be both composite since in this case n 2 1 n^{2}-1 could not be a product of three different primes. Thus, one of the numbers n -1 and n + 1 must be a prime, and the other one must be a product of two primes.

For n = 4, we get n -1 = 3, n + 1 = 5, and this condition is not satisfied. Similarly, for n = 6, we get n -1 = 5, n +1 = 7; for n = 8, we have n -1 = 7, n +1 = 9 = 3 2 3^{2} . For n = 10, we have n -1 = 32, and for n = 12 we have n -1 = 11, n +1 = 13.

For n = 14, we have n -1 = 13, n +1 = 15 = 3· 5. Thus, the least positive integer n for which n 2 1 n^{2}-1 is a product of three different primes is n = 14, for which n 2 1 n^{2}-1 = 3 · 5 · 13. Since 1 6 2 1 16^{2}-1 = 3 · 5 ·17, we see that the next number which satisfies the required property is n = 16. Now, 1 8 2 1 18^{2}-1 = 17 .19, 2 0 2 1 20^{2}-1 = 19 .21 = 3· 7 ·19, and the third such number is n = 20. Next, 2 2 2 1 22^{2}-1 = 3 · 7· 23, and the fourth of the required numbers is n = 22. Continuing in this way we find easily the fifth such number to be n = 32, for which 3 2 2 1 32^{2} -1 = 3 · 11 · 31.

Thus, the first five integers n for which n 2 1 n^{2}-1 is a product of three different primes are 14, 16, 20, 22, and 32.

Thus 14 × 16 × 20 × 22 × 32 14 \times 16 \times 20 \times 22 \times 32 is 3153920.

Well I did the same but is there any shortcut method??

Naman Kapoor - 6 years, 4 months ago

Log in to reply

Hi, currently I am in the process of analyzing a new approach to these kind of problems , so I strike gold I'll definitely let you know ?

A Former Brilliant Member - 6 years, 4 months ago

Python

s=[]

t=[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997]

# list of 999 primes

for i in range(0,100):

    for j in range(i+1,100):

        for n in range(999):

            for m in range(j+1,100):

                if n**2.0-1.0==t[i]*t[j]*t[m]:

                    print [n**2-1.0],n

Mehul Chaturvedi - 6 years, 3 months ago

But 11^2-1=120 which is equal to 2^3 3 5

Archit Boobna - 6 years, 4 months ago

Log in to reply

Sorry but I didn't quite comprehend what you are trying to say .

A Former Brilliant Member - 6 years, 4 months ago

n=5 also works. 24=3 4 2

Chirag Singapore - 6 years, 4 months ago

Log in to reply

4 is not prime

Vaibhav Prasad - 6 years, 3 months ago
Rimba Erlangga
Feb 2, 2015

factorize so you get ( n + 1 ) ( n 1 ) (n+1)(n-1) , then you can brute force :v

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...