[Tpa] Weekend puzzler

Jonathan McKeown jonathan at hst.org.za
Fri Jan 13 10:04:13 UTC 2006


Jeremy and I were talking about Lisp and whether its features were making 
their way into modern languages. I thought I'd throw out this problem to keep 
everyone amused over the weekend:

Smooth numbers are numbers with no large prime factors. (Smooth numbers are 
used in some algorithms for fast Fourier transforms, among other uses). One 
family of smooth numbers, the 5-smooth numbers whose only prime factors are 
2, 3 and 5, are also known as the Hamming Numbers.

The Hamming sequence starts out
1 2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 27 30 32 36

Write a program in your favourite language to generate the first 3,000 Hamming 
Numbers.

See you all on Wednesday!

Jonathan


More information about the Tpa mailing list