Solution to the Problem:
The answer is 23.
Keith Mealy sent in the following analysis:
For any n > 23
if n = 0 (mod 4) Then n = a*4
if n = 1 (mod 4) Then n = 9 + 16 + b*4 = 25 + b*4
if n = 2 (mod 4) Then n = 18 + 8 + c*4 = 26 + c*4
if n = 3 (mod 4) Then n = 27 + d*4
James Alarie wrote, " We did a variation of this some time in the past and I
provided the equation: A * B - A - B."
Here are the variations from the past:
Chicken McNuggets from 4/06/1998
Bread and Milk Problem from 4/12/2004