Cayley problem 21, 1997

January 14, 2020

From the Cayley competition, 1997. Consider the equation

with the constraint Find all solutions among the natural numbers.

If we set and do a bit of algebra, the variable vanishes and we are left with Organizing the possible values of , and into a table, we get something like…


11 1 1
11 1 2
11 1 27
22 2 1

If you have good bookkeeping skills, finish the whole table. You should get 42 rows! So there are 42 possible solutions.

But let’s verify this with a little computer programming. Define a predicate that is true when the given conditions of the problem are true:

#lang racket

(define (cayley-21-conditions? a b c)
  (and (= (/ (+ (/ a c) (/ a b) 1)
             (+ (/ b a) (/ b c) 1))
	  11)
       (<= (+ a (* 2 b) c)
           40)))

Then loop through all the possibilities for , and from 1 to 40 and collect them into a giant list of triples . Then we filter this list by applying the cayley-21-conditions? predicate to each one. Those that pass are kept, those that are false are filtered out.

(define (abc-filter max-a max-b max-c predicate)
  (filter (lambda (args)
            (apply predicate args))
          (for*/list ((a (range 1 (+ max-a 1)))
                      (b (range 1 (+ max-b 1)))
                      (c (range 1 (+ max-c 1))))
            (list a b c))))

Running

> (abc-filter 40 40 40 cayley-21-conditions?)

Yields a list of solutions. Then calling length on this list gives the total number of solutions: 42.

How many solutions would there be if the second condition was ?

Cayley problem 21, 1997 - January 14, 2020 - ted szylowiec