Have you tried this, it seems to have what you want:
<EditText
...
android:inputType="number"
/>
Aside from numbers and basic operators, it includes the underscore. It even has modulo (%), factorial (!), confusion (?) should you decide to get fancy...
Addition
This is probably closer to what you want, since you apparently aren't looking for an underscore...
<EditText
...
android:inputType="phone"
/>
I only know of the three basic keyboards include in Android. If the "phone" keyboard isn't an acceptable option, you probably have to design your own...
The way I would approach designing a keyboard is like any other app. For this I would use an EditText above a TableLayout to help you organize your grid of buttons. And simply each button click would add the corresponding value to your EditText.
Addition
To clarify, a "phone" keyboard on an HTC:
