# Equation for input

I need an equation for these set of inputs and outputs. Y will equal anything below 0 or above 9 so modulo might be needed. Also if x<0 y=0 . It's probably going to be a little complex so any common mathematical symbol can be used if needed.

>| X | Y |
>| 0 | 0 |
>| 1 | 0 |
>| 2 | 0 |
>| 3 | 0 |
>| 4 | 1 |
>| 5 | 3 |
>| 6 | 6 |
>| 7 | 2 |
>| 8 | 5 |
>| 9 | 1 |
>| 10| 2 |
>| 11| 4 |
>| 12| 9 |
>| 13| 9 |
>| 14| 8 |
>| 15| 6 |

-
What do you mean "equation"? Do you mean "polynomial equation"? – rschwieb Oct 16 '12 at 13:18

OEIS finds: $$y = \left\lfloor \frac{2^x \bmod 100}{10} \right\rfloor$$
Dyrand, 3rd least significant bit would be $[(2^x\bmod1000)/100]$, 4th would be $[2^x\bmod10000)/1000]$, and so on. – Gerry Myerson Oct 12 '12 at 5:12