Interview Question

Senior Data Engineer Interview

-Berlin

Zalando

If you take 3 subsequent number (n, n+1, n+2) and know, that n and n+2 are prime numbers, can you proove, that n+1 is always dividable by 6?

AnswerAdd Tags

Interview Answers

3 Answers

8

3, 4, 5. 3 and 5 are prime. 4 is not divisible by 6.

Anonymous on

2

n+1 will be divisible by 2 since n and n+2 are prime now n,n+1 or n+2 any one of them should be divisible by 3 n and n+2 are prime so n+1 should be divisible by 3 Hence proved

Anonymous on

0

1. if n and n+2 are prime, the n+1 is dividable by 2; 2.one of the three subsequent number (n, n+1, n+2) must be dividable by 3. because n and n+2 are prime, then n+1 is dividable by 3. So n+1 is dividable by 6.

Zaiyong on

Add Answers or Comments

To comment on this, Sign In or Sign Up.