Here is the problem statement for Problem 21 of Project Euler.
Let $d(n)$ be defined as the sum of proper divisors of $n$ (numbers less than $n$ which divide evenly into $n$).
If $d(a) = b$ and $d(b) = a$, where $a ≠ b$, then $a$ and $b$ are an amicable pair and each of $a$ and $b$ are called amicable numbers.
For example, the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110; therefore $d(220) = 284$. The proper divisors of 284 are 1, 2, 4, 71 and 142; so $d(284) = 220$.
Evaluate the sum of all the amicable numbers under 10000.
My question is this: Suppose there are only three numbers $a, b$ and $c$ which have the same sum of divisors. Clearly there will be three amicable pairs, $(a,b), (b,c)$ and $(c,a)$.
Will my answer be $a+b+c$ or $(a+b)+(b+c)+(c+a)$ as being the sum of amicable pairs?
Or does the question ask us to find only pairs, in which case, the above triplet of $ a,b,c$ will not be a part of the sum.
If we consider all counting numbers including and below 10 in light of the amicable pair sum problem, below is the breakup by number.
$d(x)=n$ : (list of x with d(x)=n) sum_=sum of all x in list if more than one element exists in list.
$d(x)=1 : (2,3,5,7)$ sum1=2+3+5+7=17
- $d(x)=2 : (4)$ solitary member, hence not added sum3=0
- $d(x)=3 : (9)$ solitary member, hence not added sum4=0
- $d(x)=6 : (6)$ solitary member, hence not added sum6=0
- $d(x)=7 : (8)$ solitary member, hence not added sum7=0
- $d(x)=8 : (10)$ solitary member, hence not added sum8=0
Is the sum in this case (for all natural numbers including and upto 10) $0$ or $17$?
$(a,b)$ being an amicable pair, does not mean that $a$ and $b$ have the same sum of their divisors, but rather that the sum of the divisors of $a$ is $b$ and the sum of the divisors in $b$ is $a$. So having three numbers with the same sum of their divisors doesn't matter to this problem.