logoalt Hacker News

adrian_btoday at 2:52 PM1 replyview on HN

True, but there are as many 64-bit integers as pairs of 32-bit integers.

Therefore the fact that relatively few 64-bit numbers are products of 32-bit integers means that a lot of pairs of 32-bit integers give by multiplication the same product.


Replies

aidenn0today at 6:05 PM

That seems intuitively true given that most 32-bit numbers are composite, so if you have

X = ab and aY < 2^32 and bY < 2^32:

X × Y = X/a × aY = X/b × bY = Y × X = aY × X/a = bY × X/b

Which is 6 pairs resulting in the same product. This will be reduced if e.g. aY = X, but still...