已知A={a1,a2,a3,a4},B={a1^2,a2^2,a3^2,a4^2},其中a1<a2<a3<a4,a1,a2,a3,a4∈N,若A∩B={a1,a4},a1+a4=10,且A∪B所有元素和为124,求集合A和B.
由a1<a2<a3<a4,A∩B={a1,a4},可知a1=a1^2,∴a1=1
∵a1+a4=10,∴a4=9,
若a2^2=9,a2=3,则有(1+3+a^3+9)+(a3^2+81)=124
解得a3=5,(a3=-6舍去)
∴A={1,3,5,9},B={1,9,25,81}.
若a3^2=9,a3=3,此时只能有a2=2,
则A∪B中所有元素和为:1+2+3+4+9+81≠124,
∴不合题意.
于是,A={1,3,5,9},B={1,9,25,81}.