It's not like I share elements with you or anything, baka!
Source: AIME I #12
February 9, 2022
AIME I 12
Problem Statement
For any finite set X, let ∣X∣ denote the number of elements in X. Define Sn=∑∣A∩B∣, where the sum is taken over all ordered pairs (A,B) such that A and B are subsets of {1,2,3,…,n} with ∣A∣=∣B∣. For example, S2=4 because the sum is taken over the pairs of subsets (A,B)∈{(∅,∅),({1},{1}),({1},{2}),({2},{1}),({2},{2}),({1,2},{1,2})}, giving S2=0+1+0+0+1+2=4. Let S2021S2022=qp, where p and q are relatively prime positive integers. Find the remainder when p+q is divided by 1000.