I notice that in all four cases, that the second number is even. input #1 Input #2 Output 5 4 17 6 8 22 2 8 10 9 6 ? What we can do with even numbers, that we can't do with odd numbers, is to take half of them and get a whole number. So let's take half of them and see if that helps: Half of input #1 Input #2 Output 5 2 17 6 4 22 2 4 10 9 3 ? Aha, I see that if I subtract half of input #2 from the output number, I always get 3 times input #1. So the simplest pattern is: Multiply input #1 by 3 Take half of the second input Add them together. That works in the first 3 cases: So to find the answer to the fourth case: Multiply 9 by 3, get 27 Take half of the second input 6, get 3 Add them together, 27+3 = 30. Edwin