1. **Finding the largest element of A:**
The roots of the quadratic equation x2+mx+2020=0 are positive integers. Let the roots be p and q. By Vieta's formulas, we have:
p+q=−mandpq=2020
Since p and q are positive integers, they must be factors of 2020. The factor pairs of 2020 are:
(1,2020),(2,1010),(4,505),(5,404),(10,202),(20,101),(101,20),(202,10),(404,5),(505,4),(1010,2),(2020,1)
We need to find the pair that gives the largest value of m=−(p+q). Calculating p+q for each pair:
1+2020=2021,2+1010=1012,4+505=509,5+404=409,10+202=212,20+101=121.
The smallest sum is 121, so the largest m is:
m=−121
2. **Finding the smallest element of B:**
The roots of the quadratic equation x2+2020x+n=0 are negative integers. Let the roots be −r and −s. By Vieta's formulas, we have:
−r−s=2020andrs=n
Since r and s are positive integers, they must be factors of n. We need to find the pair that gives the smallest value of n=rs. The factor pairs of 2020 are the same as above. Calculating rs for each pair:
1⋅2020=2020,2⋅1010=2020,4⋅505=2020,5⋅404=2020,10⋅202=2020,20⋅101=2020.
The smallest n is 2020.
3. **Calculating a+b:**
The largest element of A is a=−121 and the smallest element of B is b=2020. Therefore:
a+b=−121+2020=1899
4. **Finding the sum of the digits of a+b:**
The sum of the digits of 1899 is:
1+8+9+9=27
The final answer is 27