Undulating number


An undulating number is a number that has the digit form ABABAB... when in the base 10 number system. It is sometimes restricted to non-trivial undulating numbers which are required to have at least 3 digits and A ≠ B. The first few such numbers are:
For the full sequence of undulating numbers, see.
Some higher undulating numbers are: 6363, 80808, 1717171.
For any n ≥ 3, there are 9 × 9 = 81 non-trivial n-digit undulating numbers, since the first digit can have 9 values, and the second digit can have 9 values when it must be different from the first.

Undulating prime

An undulating prime is an undulating number that is also prime. In every base, all undulating primes having at least 3 digits have an odd number of digits. The undulating primes in base 10 are: