How to create a slider with dynamic scale value?

I need to create a slider a slider with dynamic range intervals bet ween the tick value.

For example i need a slider like this

1----2----4----8----16

Thanks in advance

Regards
Goutam Janardhanan

Any luck with this? Could you ever solve it?