Simple math

1. May 17, 2007

thagamizer

how many 5 digit numbers are there in which every two neighbouring digits differ by 3?

can you please tell me if i have to do this all by trial and error or is there some sort of formula i need to make to do this
thanks

2. May 17, 2007

matt grime

Trial and error? You mean you're going to guess a number and see if it satisfies the condition?

What if I told you the first digit were a 1? What is the second digit?

3. May 17, 2007

thagamizer

14741
but theres too many possibilites

4. May 17, 2007

thagamizer

what i meant is do i need to make a formula to work out the number of combinations

5. May 17, 2007

matt grime

There are not too many possibilities. And that isn't the only one that starts with 1. You could write down a recurrence relation, if you wished, but I doubt that will help - just do it, it isn't very hard, and won't take you very long.

6. May 23, 2007

prasannapakkiam

This was in the UNSW Maths comp. Hint: it is around 40...