# Sunday Times Teaser 3080 – One of a Kind

*by Andrew Skidmore*

#### Published Sunday October 03 2021

The raffle tickets at the Mathematical Society Dinner were numbered from 1 to 1000. There were four winning tickets and together they used each of the digits from 0 to 9 once only. The winning numbers could be classified uniquely as one square, one cube, one prime and one triangular number. For example, 36 is a triangular number as 1+2+3+4+5+6+7+8 = 36, but it cannot be a winner as 36 is also a square. The tickets were all sold in strips of five, and two of the winning numbers were from consecutive strips. The first prize was won by the holder of the smallest-numbered winning ticket, which was not a cube.

List the four winning numbers in ascending order.

5 Comments
Leave one →

@Brian,

Nice and fast code, but you have interpreted “classified uniquely” differently as I would have thought. Fi, you don’t seem to dismiss c = 64 (as it is a square as well).

@Frits

I didn’t interpret it at all as I wasn’t sure what it meant. So I proceeded without it and found that it wasn’t needed in finding the solution. But I have now added a test for the sake of completeness.

Starting with consecutive strip logic.