Hi there

About 20 years ago I read a short story but Isaac Asimov (I'm pretty sure it was him). It involved a discussion between a father and suitor for his daughter. In order to gain the father's blessing, the suitor needed to decipher a numerical code (which I think then asked a question). The story is about how the suitor, thinking aloud, narrated his reasoning to the father about how to crack the code. It ended up being based on atomic numbers in the periodic table I think.

Does anyone remember the name of the story? I've been hunting for it but can't find it.

Thank you!