I noticed that for an odd digit, then there are 4 choices for an even digit. For an even digit, there are 5 choices for an odd digit. There are 5 locations possible in the integer. What would be a good approach here?


Hint: look for examples of $6$-digit integers where consecutive digits never differ by an odd number.

  • $\begingroup$ Each digit is odd or each digit is even. Where should I go from here? $\endgroup$ – dragonking Apr 2 at 0:21
  • $\begingroup$ Count all possibilities for these. You should find that's pretty easy. $\endgroup$ – David Apr 2 at 0:48
  • $\begingroup$ There are $10^6$ possibilities (10 digits including 0 to be placed in 6 positions) subtracted by $4^7$ for all even digits (including 0) subtracted by $4^7$ for all odd digits (including 0). Is that it? I am just learning the topic so thank you for the help. $\endgroup$ – dragonking Apr 2 at 1:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.