Number Theory or Algebra? Part 7

Find the sum of all values of positive integers n n which makes n + 1 , n + 3 , n + 7 , n + 9 , n + 13 , n + 15 n+1, n+3, n+7, n+9, n+ 13, n+ 15 all prime numbers at the same time for each value of n n


The answer is 4.

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.

3 solutions

The only n n that will work is 4 4 .

The proof that no other values of n n exist can be proved in the same way as the solution by Mursalin Habib for this problem . Just change into 5 k 5k , 5 k + 1 5k + 1 , ..., 5 k + 5 5k + 5

I misunderstood the question: n doesn't have to be prime.

William Isoroku - 6 years, 9 months ago
Masba Islam
May 4, 2014

Python code:

def checkprime(n):

s=0

for i in range(n/2):

    if n%(i+2)==0:

        s=s+1

if s==0:

    return 0

else:

    return 1

def sum(k):

q=0

for p in range(k):

    m=p+1

    a=checkprime(m+1)+checkprime(m+3)+checkprime(m+7)+checkprime(m+9)+checkprime(m+13)+checkprime(m+15)

    if a==0:

        q=q+m

return q
Basant K Jha
May 2, 2014

when have to put a value of such that n+1 is even and satisfy all n+3,n+7,n+9 and n+15 all are odd then only 4 satisfy above requirement and no other value except 4 satisfy above requirements

Because 4= not only= 1* 4, but also= 2* 2, so 4 is a prime number ??

Panya Chunnanonda - 6 years, 8 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...