Count ordered pairs of numbers with a given LCM

Can anyone please help me with the formula they used to count the number of ordered pairs.
[{(m1 + 1)^2 – m1^2} * {(m2 + 1)^2 – m2^2} * ……* {(mn + 1)^2 – mn^2} ]

1 Like

That can be derived with intuition. Please check out this link and watch it from 3:00-13:00, you will get ur doubt clarified.
Hope it’s helpful. :v:

1 Like

Thanks a lot :green_heart:

My pleasure :slightly_smiling_face:.
#happy coding

1 Like