Introspective Step Function

Screen Shot 2014-11-04 at 9.17.21 PMToday I derived a neat little function I haven’t needed in the past.  I don’t know if there is already for a classification for this type of function but its a step (floor) function whose value tells you when the next step is going to happen.  “n” is the number of steps you want to happen before 1.  So for example f(4,0) = 0.125, f(4,0.124) = 0.125, f(4,0.125) = 0.375.

I ended up using this to create another function that had spurts of regular activity, a saw wave with steep slope and long period,  so the graph ended up looking like: ____/____/____/  More concretely it allowed me to turn interpolation between values on in pulses.  I imagine there are a few cases where this class of function could be helpful.