Binary Equation

try this:

(this is a 10bit conversion scheme)

in an arduino sketch you would use / (division) and % (modulo) on integers in a while loop (or for, or any flavour of loop you desire)

you would not find an algebraic function that is not recursive, to do your work.

D.