**From New Scientist #1474, 19th September 1985** [link]

We are going to run a tombola at our big local charity ball. We’ve had a particular number of tickets printed, numbered consecutively from 1 upwards. We asked the printer to put “Prize-winner” on all those tickets whose number had its digits increasing from start to finish (e.g. 9, 37, 256, etc), but in error he marked those tickets whose numbers had their digits decreasing from start to finish (e.g. 7, 54, 310, etc). (Single digit numbers were intended to be winners and were printed as winners).

By a great coincidence this meant that there were as many prize-winning tickets as we had wished. But had the number of tombola tickets been any higher that could not have been the case.

How many tickets were there?

[enigma326]

### Like this:

Like Loading...

This Python program finds intervals where the numbers of “ups” (numbers with increasing digits) and “downs” (numbers with decreasing digits) are equal. It runs in 44ms.

Solution:There were 8519 tickets.There are 255 “ups” and “downs”.