# Thread: A Set Problem and a Sum Problem

1. ## A Set Problem and a Sum Problem

I'm not sure what category these belong in. They're somewhat like puzzles.

1. In a certain town, there live exactly 100 men. 85 are married, 70 have a cell phone, 75 own a car, and 80 own a house. What is the smallest possible number of men who do all four (married, have cell phone, own car, own house)?

I got an answer for that but I'm looking for a more formal way of doing it.

2. Find all the positive integers n such that 1! + 2! + ... + n! is the square of a positive integer, for n >= 3

2. Well, for number 1, the minimum is of course attained if the 15 who are not married, 30 who have no cell phone, 25 who have no car and 20 who don't have a house are not overlapping at all. 15+30+25+20=90 who lack one of these 4 attributes. So 10 is the smallest possible number who has all 4. And it's good to see that bachelors have their priorities straight. Every bachelor in town owns his home, his car, and isn't on his parents' cell phone plan. Such an independent lot.

Number 2 looks like a toughie though.

3. Number 2:

The square of a positive integer? Did you really need to say "positive" there? Anyway, ok, perfect squares modulo 5. 0 is 0 mod 5, 1 is 1 mod 5, 4 is 4 mod 5, 9 is 4 mod 5, 16 is 1 mod 5, 25 is 0 mod 5. If x is not 0 through 5, then it can be expressed as 5*n+p where p is 0 through 4 and n is an integer, and mod 5, its square is 25*n^2+10*n*p+p^2, which mod 5 is p^2. p is between 0 and 4 though. So EVERY perfect square is going to be, mod 5, the same as the possible modulo 5 values of 0 through 4, which can be 0, 1 or 4 mod 5. On the other hand, 1!+2!+3!+4! is 33, which is 3 mod 5. Any factorial 5! or above DEFINITELY is a multiple of 5, so if n>=5, then there is NO SOLUTION, because it is ALWAYS the prohibited 3 mod 5 for ALL n 5 or more. So you try it with n=3, which yields 6+2+1=9 (yippie), n=4, which yields 24+6+2+1=33 (oh right), and we're done. n=3 is the ONLY SOLUTION of this silly sum that adds to a perfect square. Finally I will try to do problem number 4. I sure hope the unit of currency in problem number 3 isn't the dead rat, because that town would smell terrible with over 2 billion of them. I'm sorry, I just thought I should mention that.