It isn't possible to answer your question without knowing what the data you have looks like and what you want to get out of it.
edit: there isn't one (and only one) correct function for _anything_ from real data. All models are approximations. 'All models are wrong, but some are useful'.
I'm not interested in a model that would describe what might be in between the points, but rather in a function that can return an exact y for a given x. That is, if we passed 52, we get the 1.
Somehow close to linear interpolation, but this is not what I'm looking for because, with interpolation, with 100 points the function will be of degree 99.
Okay, so you want to reconstruct the original data, exactly as received. Nothing else.
> Somehow close to linear interpolation, but this is not what I'm looking for because, with interpolation, with 100 points the function will be of degree 99.
It sounds like you're looking for compression: describing the original signal using less information than in the signal itself. And you want the compression to be lossless: it should reconstruct the original exactly.
In that case, the answer is "no": lossless compression of an arbitrary signal is known to be impossible. (It's pretty easy to show, actually.)
But maybe that isn't what you really want? Lossless compression of a signal like a heartbeat is not something anyone really cares about doing. So, what is your application? What is it that you really need from this?
-------------
P.S. What you describe as "linear interpolation" is really "fitting a polynomial".