What is a pairing function ?
A pairing function reversibly maps two non-negative integers onto a single non-negative integer.
Two informative resources around pairing functions can be found here and here.
Szudzik pairing function
Created by Matthew Szudzik (Wolfram Research, Inc) - this is a short presentation.
Cantor pairing function
Created by Georg Cantor - this is a short presentation.