A number n selected from {1,…,1000}. Find the probability that ∑i=1ni∑i=1ni2 is an integer.
Solutions · 1
Official solution
\[\frac{\sum i^2}{\sum i} = \frac{2n+1}{3}\]
This is an integer when 2n+1≡0(mod3), i.e. n≡1(mod3). Values of n from 1 to 1000: n=1,4,7,…,1000 --- 334 values.
\[P = \frac{334}{1000}=0.334\]