O'Nan moonshine and arithmetic