Let us assume that the union of the sets consists of integers from 1 to n. Let Si denote the number of sets that i belongs to. Then the total number of elements of n sets is 5n=S1+S2+⋯+Sn (∙).
Let us assume S1>5 and 1∈A1,1∈A2,1∈A3,1∈A4,1∈A5,1∈A6. If 1∈Ai,i=1,n, then the remaining 4n elements have to be different. Because ∣Ai∩Aj∣=1,i=j holds. That means, we have 4n+1 different elements. It contradicts to ∣A1∪A2∪⋯∪An∣=n. Thus we can assume that 1∈/A7.
Since ∣Ai∩Aj∣=1 for 1≤i,j≤6, the intersections of A7 with A1,A2,…,A6 are all different. Hence ∣A7∣≥6. But it contradicts to ∣A7∣=5. This leads to S1≤5. Analogously, Sk≤5 for k=1,n. Considering (∗), Sk=5 holds for i=1,n. Hence the number of sets is n=4⋅5+1=21. The construction is:
A1A4A7A10A13A16A19={1,2,3,4,5}={1,14,15,16,17}={2,7,11,15,19}={3,6,7,8,9}={3,18,19,20,21}={4,8,12,16,20}={5,10,11,12,13}A2A5A8A11A14A17A20={1,6,7,8,9}={1,18,19,20,21}={2,8,12,16,20}={3,10,11,12,13}={4,6,10,14,18}={4,9,13,17,21}={5,14,15,16,17}A3A6A9A12A15A18A21={1,10,11,12,13}={2,6,10,14,18}={2,9,13,17,21}={3,14,15,16,17}={4,7,11,15,19}={5,6,7,8,9}={5,18,19,20,21}.