How to find all positive integers A and B such that
$400*A+399*B=10026475$, where $A \in [1000..5963]$ and $B \in [0..A-1]$.
I tried on this way
total:=[];;
for A in [1000..5963] do
for B in [0..A-1] do
f:=400*A+399*B;
if f=10026475 then
Print(f);
Add(total,f);
fi;
od;od;
gap> A;
5963
gap> B;
5962
But there are not all possible solutions of A and B.
Thanx in advance
Since $400\cdot 5963+399*5962=4764038\ll 10026475$ this equation has no solution as specified.