If you don't want people to invoke the `_factor_trial_division` function directly, then don't list it in the `ntheory.h`. The header files are only for things that you want people to use, or alternatively if you need to use it somewhere else in the code. In this case, you can simply remove it from here, since you only use  `_factor_trial_division` in `ntheory.cpp`.