# interview question

#### ferdowsi

Ugh, you're right, I didn't account for order.

Choose a suit, take 2 cards, choose another suit, take 2 cards, the other two suits have 1 card.
Choose a suit, take 3 cards, the other three suits have 1 card.

((4C1)*(13C2)*(3C1)*(13C2)*(2C1)*(13C1)*(1C1)*(13C1) + (4C1)*(13C3)*(3C1)*(13C1)*(2C1)*(13C1)*(1C1)*(13C1)) / (52C6)

This is my next best guess. I haven't done these problems in a few years.

I think you have the right logic, but it should be this:

((4C2)*(13C2)*(13C2)*(13C1)*(13C1) + (4C1)*(13C3)*(13C1)*(13C1)*(13C1)) / (52C6)

It gets you the same answer as the method I used above.

#### aaronhotchner

I'm not saying it's not. My argument is this: are you 100% certain that darth's answer is the one they intended? If not (and I can't see how you can be certain given its obscurity), then the question isn't well-defined.

Well, I'm not the employer asking the question, but my argument is that any good answer is acceptable. The fact that there are infinitely many answers doesn't make all of them good, but I agree there isn't one "right" answer. There are, though, only a few good ones.

#### aaronhotchner

I think you have the right logic, but it should be this:

((4C2)*(13C2)*(13C2)*(13C1)*(13C1) + (4C1)*(13C3)*(13C1)*(13C1)*(13C1)) / (52C6)

It gets you the same answer as the method I used above.

You're probably right, thanks.

#### Augu

I think you have the right logic, but it should be this:

((4C2)*(13C2)*(13C2)*(13C1)*(13C1) + (4C1)*(13C3)*(13C1)*(13C1)*(13C1)) / (52C6)

It gets you the same answer as the method I used above.
Thanks...
I thought C(13,1)^4/C(52,6), but it was wrong.

#### Sarj

That's pretty obscure. I found another obscure pattern you can use: It's the square of prime powers (prime powers being prime numbers raised to whole numbers). This would make x = 7^2 = 49, and y=8^2 = 64.

I stand by my first response that this question is not well-defined and has an infinite number of answers.

I do not believe that your solution, that the sequence is the square of prime powers, works. The original sequence in question was:

sequence {1,4,9,16,25,x,y}
y is not equal 49; find x, y

a prime number is a number greater than 1 that has no positive divisor other than 1 and itself. Because 1 is not a prime number, your solution would not work.

Darth's answer is the correct one.

#### pruse

I do not believe that your solution, that the sequence is the square of prime powers, works. The original sequence in question was:

sequence {1,4,9,16,25,x,y}
y is not equal 49; find x, y

a prime number is a number greater than 1 that has no positive divisor other than 1 and itself. Because 1 is not a prime number, your solution would not work.

Darth's answer is the correct one.

Of course ferdowsi 's solution works; think about it a tad bit more. His answer is much more likely to be the intended one and the one that I (most definitely!) agree with.

Just consider bifunctional proportionality, followed by a little hedonic calculus, and you're good to go...

#### Sarj

Of course ferdowsi 's solution works; think about it a tad bit more. His answer is much more likely to be the intended one and the one that I (most definitely!) agree with.

Just consider bifunctional proportionality, followed by a little hedonic calculus, and you're good to go...

what prime number squared equals 1?

#### pruse

what prime number squared equals 1?

Why do you need 1 to be the square of a prime? If I define a set of numbers by the condition "...containing non-distinct prime factors," then the number 1 will vacuously satisfy this condition. Semantics, my friend, semantics.

You can also take a more careful look at ferdowsi's statement, "...the squares of prime powers...", to see that 1 is not actually excluded: it is merely a prime raised to the power 0.

Again, ferdowsi's solution is the far likelier one. Obviously.

#### Sarj

Why do you need 1 to be the square of a prime? If I define a set of numbers by the condition "...containing non-distinct prime factors," then the number 1 will vacuously satisfy this condition. Semantics, my friend, semantics.

You can also take a more careful look at ferdowsi's statement, "...the squares of prime powers...", to see that 1 is not actually excluded: it is merely a prime raised to the power 0.

Again, ferdowsi's solution is the far likelier one. Obviously.

no my friend. it's a matter of correctness. ferdowsi said that this was the square of prime powers. 1 is not a prime number, the solution does not hold for every instance in the sequence, therefor the solution is incorrect.

Here are the first few numbers in the prime powers sequence: 2,3,4,5,7,8,9...
(http://en.wikipedia.org/wiki/Prime_power and http://mathworld.wolfram.com/PrimePower.html)

there is no 1 in the prime powers sequence.

Darth's solution, "every integer is a sum of at most 3 signed squares...the basis set for representing positive integers with positive squares is
, so 49 is never used"
which was cut and pasted directly from the wolframalpha website (http://mathworld.wolfram.com/SquareNumber.html see the paragraph directly after equation (6)) is more likely the solution to the question.

#### pruse

no my friend. it's a matter of correctness. ferdowsi said that this was the square of prime powers. 1 is not a prime number, the solution does not hold for every instance in the sequence, therefor the solution is incorrect.

Here are the first few numbers in the prime powers sequence: 2,3,4,5,7,8,9...
(http://en.wikipedia.org/wiki/Prime_power and http://mathworld.wolfram.com/PrimePower.html)

there is no 1 in the prime powers sequence.

Darth's solution, "every integer is a sum of at most 3 signed squares...the basis set for representing positive integers with positive squares is
, so 49 is never used"
which was cut and pasted directly from the wolframalpha website (http://mathworld.wolfram.com/SquareNumber.html see the paragraph directly after equation (6)) is more likely the solution to the question.

You've really gotta be kidding me. Of course 1 is a prime power: any prime to the zero.

You really think they intended a solution as esoteric as "the basis set for representing positive integers with positive squares is " blah blah blah... ?? You must be high on bath salts.

#### Sarj

You've really gotta be kidding me. Of course 1 is a prime power: any prime to the zero.

You really think they intended a solution as esoteric as "the basis set for representing positive integers with positive squares is " blah blah blah... ?? You must be high on bath salts.

so someone proves you wrong and you want to take a personal attack at them? that's cool

#### pruse

so someone proves you wrong and you want to take a personal attack at them? that's cool

Oh, sir, you're right, I humbly apologize for the misunderstanding. How could I ever think 1 was a power of a prime!

But maybe we can still salvage ferdowsi's solution by rephrasing it... "Any perfect square that does not have more than 1 distinct prime factor."

#### Sarj

Oh, sir, you're right, I humbly apologize for the misunderstanding. How could I ever think 1 was a power of a prime!

But maybe we can still salvage ferdowsi's solution by rephrasing it... "Any perfect square that does not have more than 1 distinct prime factor."

I invite you to use the wolframalpha.com website. in their search menu type the following to test if 1 is a primepower:

PrimePowerQ[1]

#### koupparis

##### Carpe noctum
I think prime power implies a positive exponent, which is why 1 may be excluded from some definitions.

#### pruse

I invite you to use the wolframalpha.com website. in their search menu type the following to test if 1 is a primepower:

PrimePowerQ[1]

Why are you still talking about prime powers? Did you not see that I rephrased the solution?

Must be those bath salts again...

#### pruse

Besides, semantics aside, here is why 1 should be included among prime powers...

When, for example, computing the number of factors of a number that we've prime-factorized, (p_1^{e_1}p_2^{e_2}\cdots p_k^{e_k}), every factor is of the form (p_1^{f_1}p_2^{f_2}\cdots p_k^{f_k}), where each (f_i) ranges from (0) (!!!) to (e_i).

Anyhow, get off the bath salts and accept the other phrasing of the solution.

#### aaronhotchner

Bumping this thread to agree with Sarj on this one.

Bump away.

#### Sarj

Bump away.

One of the most commonly forgotten things about mathematics is that all statements are if and only if statements. This is one of the very first things that my number theory professor reminded us of.

By definition, a number is a prime power if it is a positive integer power of a prime number. This means that we take a prime number, raise it to some power, and the resulting number is a prime power. So if we let n equal some positive integer, then raising a prime number to n, will result in a prime power.

For example:
2 is a prime power, as 2^1 = 2
4 is a prime power, as 2^2 = 4
8 is a prime power, as 2^3 = 8
16 is a prime power, as 2^4 = 16

This side is easy to see. Let’s look at another statement that we can make about prime powers. If we let n denote some positive integer, then a number is a prime power only if we can raise that number to the power of 1/n and come to a prime number.

For example:
2^(1/1)= 2
4^(1/2)= 2
8^(1/3)= 2
16^(1/4) = 2

Let’s take a look at your claim that 1 should be included as a prime power. We can raise any prime number to 0 and arrive at 1.
2^0 = 1

How do we fulfill the only if statement? Let’s examine the number 16 for a minute. We saw that:
2^4 = 16
16^(1/4) = 2

If we follow the same logic structure, then we should be able to do the same when we raise 2, or any prime number (or any number) to a power. Let’s try out your statement that 1 should be included because we can raise any number to zero and get 1.
2^0 = 1
1^(1/0) = undefined

If your proposition was correct, we should have been able to raise 1^(1/0) and come back to 2. But we can’t. In fact, 1 raised to any power is just 1. And 1 is not a prime number.

#### koupparis

##### Carpe noctum
Just to make your post clear, I think by statements you actually meant definitions. Not every statement is an iff.

Replies
2
Views
906
Replies
34
Views
8K
Replies
0
Views
399
Replies
1
Views
982
Replies
13
Views
5K