Tesla Interview Question

Is 3,599 a prime number? Yes or No. Explain.

Interview Answers

Anonymous

Jun 10, 2020

3599 = 3600-1 = 60^2 - 1^2 This is known as "difference of two squares" Which factors into (60-1)*(60+1) Therefore factors are 59 and 61 A longer, more general method is to say that you only need to check primes less than the square root of 3599, which again because its 60^2 - 1 you can just try primes less than 60.

2

Anonymous

Jul 17, 2014

(N+A)(N-A)=N^2-A^2

2

Anonymous

Jul 23, 2014

3600 = 60^2 Sqrt(3600 - 1) = 60 -/+ 1 >>> 59 x 61

1

Anonymous

Jun 9, 2019

The point of the question isn't whether you're right, it's how you got to your answer, right or wrong, in your head under pressure. Did you use a process or did you just decide it was or wasn't? How hard did you try? It's very revealing of troubleshooting mentality and overall ethic.

Anonymous

Jun 17, 2014

No

Anonymous

Jul 6, 2015

a^2 - b^2 = (a+b)(a-b) where a=60 and b=1

Anonymous

Nov 1, 2015

3599 = 3600 - 1 = (60)^2-1^2=(60+1)(60-1)=61*59

1

Anonymous

Mar 6, 2018

Answer #3 "Any number that has 9 in the units is divisible by 3 and not prime" is incorrect. 3593 is a prime and has a 9 in it.

Anonymous

Jun 2, 2014

No. Bc 3600 is 36 squared so 3599 is 59 times 61.

1

Anonymous

Jun 17, 2014

Any number that has 9 in the units is divisible by 3 and not prime

4