For n = 1730, u(n) = 21870, my f(n) fell a hair below .5,
it should have been .5 exactly. 

If you divided by 21.6, that could be the cause.