# Michael Reid’s Happy New Year Puzzle, 2012

Here is another puzzle from Michael Reid on NOBNET. (Michael also notes that if you find a solution (a,b,c,d,e,f) then (d,e,f,a,b,c) is another solution.)

Puzzle: Replace a, b, c, d, e, f with the first six prime numbers, in some order, to make the expression $a\cdot b^c + d \cdot e^f$ equal to the New Year.

Best wishes for a happy, healthy and prosperous New Year!

## One thought on “Michael Reid’s Happy New Year Puzzle, 2012”

1. Thanks for posting!

***SPOILERS***

Found the two solutions by brute force in Sage:

primes = primes_first_n(6)
func(a, b, c, d, e, f) = a * b^c + d * e^f
for a in permutations(primes):
….: if func(*a) == 2012:
….: print a
….:
[11, 5, 3, 13, 7, 2]
[13, 7, 2, 11, 5, 3]

Or a two-liner:

func(a, b, c, d, e, f) = a * b^c + d * e^f
[a for a in permutations(primes_first_n(6)) if func(*a) == 2012]