## Teaser 2802: That’s the ticket!

**From The Sunday Times, 5th June 2016** [link]

Alan, Betty and Charlie each chose a different set of six numbers (from 1 to 49) for their lottery ticket. In each case the product of the six numbers was a perfect square and also each set of six numbers used each of the digits 0 to 9 exactly once.

Alan won the lottery by getting all six numbers correct. Betty and Charlie also got prizes because they each had at least three numbers correct.

What were Alan’s six numbers?

[teaser2802]

## Jim Randell 8:59 am

on9 September 2019 Permalink |We have six numbers (between 1 and 49) that between them use 10 digits (each of the digits 0-9 exactly once). So four of the numbers must have 2 digits, and their tens digits are all different, so the set of six numbers is of the form (alphametically):

where

a, b, c, d, e, fare the digits 0, 5, 6, 7, 8, 9 (in some order).It turns out there are only three possible sets of six numbers that use the digits 0-9 exactly once and multiply together to give a square. Fortunately one of them shares 3 or more numbers with the other two, so this gives us A’s numbers.

This Python program runs in 36ms.

Run:[ @repl.it ]Solution:Alan’s numbers were: 8, 9, 16, 27, 30, 45.There are only two options for Betty and Charlie:

LikeLike

## GeoffR 9:47 am

on19 September 2019 Permalink |LikeLike