May 11th, 2005, 11:39 am
Well, this may not work because I haven’t thought it totally through, but you could try this:1. For every number r coming in, write down its prime number decomposition as r = 2^a2 * 3^a3 * 5^a5 * 7^a7 * ….2. Keep track of the number of times ak = n occurs for each ak and each possible n for the whole list; call this N(ak,n).3. You know the right answer Nright(ak,n) for N(ak,n) given a range of r in [1,100]; for example Nright(a7,2) = 2 because there are two numbers r = 49, 98 that have the factor 7^2. Also Nright(a7,1) = 12 for the 12 numbers r = 7,14,21,28,35,42,56,63,70,77,84,91 (but not 49 and 98).4. Get D(ak,n) = Nright(ak,n) - N(ak,n) for all k,n. This gives you the prime number decomposition of the missing number. For example, if r = 40 = 2^3 * 5^1 is missing, you will get D(a2,3) = 1 and D(a5,1) = 1 corresponding to factors 8*5 which is 40.5. For two missing numbers, e.g. r = 40 and r = 72 missing, you will get D(a2,3) = 2, D(a3,2) = 1, D(a5,1) = 1. Now you have to see the combinations of products of 8, 8, 9, and 5. You cannot use 64 and 45 because 64 = 2^6 and you know D(a2,6) is correct already. However, I don’t know if this is general.--------------
Last edited by
JWD on May 10th, 2005, 10:00 pm, edited 1 time in total.