MathDB
Bosnia and Herzegovina TST 1996 Day 2 Problem 3

Source: Bosnia and Herzegovina Team Selection Test 1996

September 20, 2018
probabilitynumber theoryfloor function

Problem Statement

Let aa and bb be two integers which are coprime and let nn be one variable integer. Determine probability that number of solutions (x,y)(x,y), where xx and yy are nonnegative integers, of equation ax+by=nax+by=n is nab+1\left\lfloor \frac{n}{ab} \right\rfloor + 1