Research Article

On a Diophantine Equation That Generates All Integral Apollonian Gaskets

Algorithm 1

An algorithm that produces all integral disk packings.
for 𝐡 = 1 to whatever you wish
  for πœ‡ = 0 to int ( 𝐡 / √ 3 )
      evaluate 𝐻 = 𝐡 2 + πœ‡ 2
   for π‘˜ = 2 πœ‡ to int( √ 𝐻 )
       if 𝑛 = 𝐻 / π‘˜ is an integer and gcd ( 𝐡 , π‘˜ , 𝑛 ) = 1
       then the quintet of main curvatures is
    ( βˆ’ 𝐡 , 𝐡 + π‘˜ , 𝐡 + 𝑛 , 𝐡 + π‘˜ + 𝑛 βˆ’ 2 πœ‡ , 𝐡 + π‘˜ + 𝑛 + 2 πœ‡ )
  next π‘˜
 next πœ‡
next 𝐡