added examples
changed predint sqrt((n+1)/n)