A number theory problem by Nashita Rahman

What is the least possible positive integer that is divisible by all the prime numbers less than 30?


The answer is 6469693230.

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.

1 solution

Md Zuhair
Jan 7, 2017

Relevant wiki: Prime Numbers

This is done by simple using your brain, use calculator

Prime nos less than 30 are 2,3,5,7,11,13,17,19,23,29

Multiply all of them with the calculator as they dont have any divisor other than 1 and themselves , The divisor of all of them would be all their product and 1, So excluding 1,

And you get 6469693230 \boxed{6469693230}

The twist in this problem is you are not told about using the calculator

If you were told so , it would have become more easier

I used a Python code to multiply out the primes lesser than 30 xD

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
def nf(n):
    s=0
    i=1
    while i <= n:
        if n % i == 0:
            s += 1
        i += 1
    return s
def isprime(n):
    if ((n!=2) & (n % 2 == 0)) | nf(n) != 2:
        return 0
    else:
        return 1
p=2
i=3
while i < 30:
    if(isprime(i)):
        p *= i
    i += 2
print(p)

Arkajyoti Banerjee - 3 years, 11 months ago

Log in to reply

I see you are addicted to CS.

I am even moving towards CS nowaday :P xP

Md Zuhair - 3 years, 11 months ago

Log in to reply

No, not exactly. After all, let's prefer smart-work over hard-work lol.

Taking a calculator and multiplying out prime numbers through [ 1 , 30 ) [1,30) sounds way too mainstream. So, a Python code for calculating the product.

Use OOPLs for cheating in number theory questions XD

My number theory isn't as good as the other topics, so I used OOPLs to solve the level 5 number theory probs.

In case you're wondering, OOPL stands for Object Oriented Programming Language :D

Happy coding!

Arkajyoti Banerjee - 3 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...