Problem

Source: 2023 Israel TST Test 3 P2

Tags: TST, number theory, Divisors



For each positive integer $n$, define $A(n)$ to be the sum of its divisors, and $B(n)$ to be the sum of products of pairs of its divisors. For example, \[A(10)=1+2+5+10=18\]\[B(10)=1\cdot 2+1\cdot 5+1\cdot 10+2\cdot 5+2\cdot 10+5\cdot 10=97\]Find all positive integers $n$ for which $A(n)$ divides $B(n)$.