Rob used all the digits except 0 to write a 9-digit counting number such

that no two consecutive digits form a 2-digit prime number. (That is, for the
number abc,def,ghi, where letters stand for unique digits, none of the
following 2-digit numbers are prime: ab, bc, cd, de, ef, fg, gh, hi.) What is the positive difference between the largest and smallest such numbers that
Rob could write?

Start with a list of the double digit prime numbers for reference:

11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79, 83, 89, 97

For the smallest 9-digit number that follows the given rule, start with 1.
1
We then try 2 next to that and find that it works, since 12 isn't a prime number.
12
3 can't go next though, as we'd have 23, which is prime, so try 4...that works.
124
Keep working your way up to 9 digits, always trying to use the smallest remaining digits first. It doesn't take very long.
Use a similar strategy for the largest 9-digit number, starting with 9 and working down as you reference the list of primes.
When you've worked out your numbers, feel free to post and I'll let you know if that's what I got.

To find the largest and smallest numbers that Rob could write, we need to determine the possible values for each digit in the number.

Let's start with the largest possible value for each digit. Since there are no restrictions for the first digit, it can be any digit from 1 to 9.

For the second digit, it cannot form a 2-digit prime number with the first digit. Therefore, the largest possible value for the second digit is 9, as the pair (19) is not a prime number.

Moving on to the third digit, we need to consider the possible values that do not form a prime number with the second digit (9). Hence, the largest possible value for the third digit is 8.

Following the same logic, the largest possible values for the remaining digits are: 7, 6, 5, 4, 3, 2, 1.

We can conclude that the largest number Rob can write is 987,654,321.

Now let's consider the smallest possible values for each digit. Since there are no restrictions for the first digit, it can be any digit from 1 to 9.

For the second digit, it cannot form a 2-digit prime number with the first digit. The smallest possible value for the second digit is 1, as the pair (91) is not a prime number.

Using the same logic, the smallest possible values for the remaining digits are: 2, 3, 4, 5, 6, 7, 8, 9.

Therefore, the smallest number Rob can write is 123,456,789.

To find the positive difference between the largest and smallest numbers, we subtract the smallest from the largest:

987,654,321 - 123,456,789 = 864,197,532.

Hence, the positive difference between the largest and smallest numbers that Rob could write is 864,197,532.