I'm running into a problem with the execution of the Chakravala method of solving these equations. Running the algorithm through Python works up until $n=181$, at which point it executes all the way up until
$a=8524204405960630, b=633599123636484, k=-6$
I imagine after this point it runs into trouble due to $b$ being divisible by $6$. My question is, how can I avoid this? The resources I've seen don't explain what to do in that situation. Any and all assistance much appreciated.
Code snippet:
for m in natural_number_generator(1):
if (a + b * m) % abs(k) == 0:
m_list.append(m)
if m >= 2 * n:
break
SOLVED: Simple solution, my program was running off of Float variables and running into issues once it reached the value of $2^52$ (which breaks the float), and switching from / to // by the divisions (so that it's using integer variables), solved it entirely. Thank you very much to Sil :)