A filter in IOS to eliminate a certain frequency range
You can think of a discrete signal as an array of values, a filter as another array of values (not necessarily of the same size), and filtering as performing an operation called convolution on both the filter and input arrays.

You can get the filter array by using programs such as Matlab, scientific python or octave (the last two are free). You can implement the filtering operation by coding the convolution operation in your own program.

Be aware that convolution can be cpu-intensive. The 'better' the filter (or, the higher its order), the larger the filter array. A better filter rejects more of the signal outside the 16-18 kHz range, and distorts less the signal inside the range. However, having more elements, a convolution using it requires more operations (basically multiplications and additions). This may be a concern on a mobile device.

See this page for detailed descriptions (including source code) of scientific python commands that do what you need. Look in particular for convolve and firwin2.