Smallest prime factor
June 21, 2015
Let smpf(n) be the smallest prime factor of n. smpf(91)=7 because 91=7×13 and smpf(45)=3 because 45=3×3×5. Let S(n) be the sum of smpf(i) for 2 ≤ i ≤ n. E.g. S(100)=1257.
Find S(1012) mod 109.
Written by gamwe6 who lives and works in San Francisco building useful things. You should follow him on Twitter