I am trying to come up with a function that (approximately) satisfies these $(x,y)$ values.
$(2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 6), (9, 5), (10, 4), (11, 3), (12, 2), (13, 1), (14, 2), (15, 3), (16, 4), (17, 5), (18, 6), (19, 7), (20, 8), (21, 7), (22, 6), (23, 5), (24, 4), (25, 3), (26, 2), (27, 3), (28, 4), (29, 5), (30, 6), (31, 7), (32, 8), \text {(other, anything)}$
I want to create a continuous function $f(x)$ which takes $x$ as input and outputs the corresponding $y$ value as given above. If possible, I don't want a piecewise function.
Is there a technique to do this?