Question 55
A positive integer is called zigzag if it satisfies these three conditions:
- Its digits are nonzero and distinct.
- It has no three consecutive digits in increasing order.
- It has no three consecutive digits in decreasing order.
For example, $14385$ and $2917$ are zigzag, but $2564$ and $71544$ are not.
a) Find the largest zigzag number.
b) How many four-digit zigzag numbers exist?
- Its digits are nonzero and distinct.
- It has no three consecutive digits in increasing order.
- It has no three consecutive digits in decreasing order.
For example, $14385$ and $2917$ are zigzag, but $2564$ and $71544$ are not.
a) Find the largest zigzag number.
b) How many four-digit zigzag numbers exist?