Suppose a pig pen has p pigs with 2 loops in their tails and q pigs with 3 loops. If p and q are both prime numbers and the total number of loops is equal to 40, how many pigs are in the pen?
Cool question, i'll be thinking about it for a couple minutes.
40 2x + 3y = 40 x -> prime y -> prime 1,2,3, 5, 7, 11, 13, 17 13*2 + 7*3 = 26+21 no 3*13 + 1*2 = 41 no 11*3 + 2*2 = 33+4 no 11*3 + 3*2 = 33 + 6 = no 7 * 3 + 19. no 5*3 + 25 = no 2*3 + 17*2 = 6 + 34 = 40 2 pigs + 17 pigs = 19 pigs Ok so my logic after seeing a pattern was using the 3loop pigs to find a prime number they could be multiplied by to get an even number, as any multiple of 2 loop pigs would be even and I need an even answer (odd + even is never even). So I chose 2, 3 loop pigs for a total of 6 loops. 40 - 6 = 34 loops / 2 = 17 2 loops pigs. In the end 2, 3 loop pigs + 17, 2 loop pigs = 19 pigs.
COOl thank you :)
Join our real-time social learning platform and learn together with your friends!