Since vp(gcd(a,b))=min(vp(a),vp(b)) and vp(lcm(a,b))=max(vp(a),vp(b)), we may show the following: Claim. For any prime p and non-negative integer k, the number of numbers n on the board such that vp(n)=k doesn't change throughout this process. Let the 15 final numbers on the board be a1≤a2≤a3⋯≤a15. Note that ai∣aj for all i<j. For each prime p, let Xp,i=vp(ai). Note that by the lemma, we have (X2,1,X2,2,…,X2,15)(X3,1,X3,2,…,X3,15)(X5,1,X5,2,…,X5,15)(X7,1,X7,2,…,X7,15)(X11,1,X11,2,…,X11,15)(X13,1,X13,2,…,X13,15)=(0,0,0,0,0,0,0,0,1,1,1,1,2,2,3)=(0,0,0,0,0,0,0,0,0,0,1,1,1,1,2)=(0,0,0,0,0,0,0,0,0,0,0,0,1,1,1)=(0,0,0,0,0,0,0,0,0,0,0,0,0,1,1)=(0,0,0,0,0,0,0,0,0,0,0,0,0,0,1)=(0,0,0,0,0,0,0,0,0,0,0,0,0,0,1) Thus, since ai=∏ppXp,i for each i, so we get the 15 final numbers on the board are 1,1,1,1,1,1,1,1,2,2,6,6,60,420, and 360360 Adding these up gives 360854 .