#!ruby -narprime eval'N,L='+$F*?, Prime.each(L/N+=r=-1){|i|r+=i*N+~L} p~r