The story is a very nicely written tale of one man, Wadlin, whose only passion in life is mathematics - numbers, puzzles, Diophantine equations ("indeterminates"), statistics. As the author describes it in snippets:
|(quoted from Coconuts)|
"The multiplication table to him was sweeter than the Song of Songs [...] To divide a number into its factors delighted him [..] An incorrect equation was to his eyes the ugliest thing in nature. [...] To his eyes, 2-4-6-8-10 was a thing of beauty; 3-6-9 had an exotic charm".
Wadlin works for a construction company owned by an honest proprietor, Dean Story. Story's rival, Marr, has a much larger company in the same field and he's unscrupulous, to boot. Marr's one weakness is a passion for numbers and a belief in his own mathematical abilities far larger than his actual capability in the field.
The two companies end up as bidders for a hospital project and Wadlin comes to understand that Marr might use under-handed tactics to outbid Story. He arrranges matters so that the night before the bidding, Marr gets tangled up in a Diophantine puzzle which he's unable to solve. As he loses himself in the intricacies of the puzzle, staying up all night, he ends up missing the auction. Honesty and Math win, hurray! This has shades of Nelson Bond's "The Geometrics of Johnny Day" (published much later), which also has a math problem flummoxing dishonest competition.
The puzzle itself is the famous "coconuts" puzzle, which has been analyzed in detail in Martin Gardner's "The Colossal Book of Puzzles" .