Can't find what you are looking for ?
Google
 



Sunday, December 16, 2007

Puzzle

Q: A very very light puzzle.
'All the boys of a class are standing in a queue with good boys occupying places corresponding to prime numbers ( ie 2nd, 3rd, 5th, 7th places etc ). the headboy Samuel who is standing right in the centre of the line is sixth boy in front of David who is interestingly second boy in front and at the back as well of two good boys. David himself is fifth boy in front of Robert who is third boy in front and at the back as well of two good boys. The last boy in the queue is also a good boy.
How many students are there in the class ?

PS : for clarification, the boy at the 10th place is the third boy in front and at the back as well of two good boys at 13th and 7th places




Ans:
N = number of students
S = (N+1)/2
D = S+6
D+2 is prime
D-2 is prime
R = D+5
R+3 is prime
R-3 is prime
N is prime

In short, we must find an S such that S+4, S+8, S+14, and 2S-1 >= S+14 are all prime. The last inequality gives S >= 15, and in fact S = 15 turns out to work. So there are 29 students in the class.

No comments: