idk im guessing not piece wise since this is recursive, and i dont think piecewise takes recursiveness into consideration, just bounds
probably something like
y = 1/floor(1/x) idk its not really cause it doesnt work for .75 or anything
looks like it really needs a floor op in there somewhere though
maybe uh
for n = 1 to n = infinity where n is int
x=y= 1-(1/(2^n))
make that into a piecewise function and that should do it. above function gives the points where the function jumps a level