What is the function of provided dataset?

56 Views Asked by At
 x | y
 0 | 0
 1 | 1
 2 | 1
 3 | 2 
 4 | 2
 5 | 2
 6 | 3
 7 | 3 
 8 | 3
 9 | 3
10 | 4
11 | 4
12 | 4
13 | 4
14 | 4
15 | 5
16 | 5
17 | 5
18 | 5
19 | 5
20 | 5

Desmos url: https://www.desmos.com/calculator/mwnivlqhfl

Pattern seems easy recognizable, but i can't figure out function $y = f(x)$

3

There are 3 best solutions below

3
On BEST ANSWER

Note that $\forall k \in \mathbb{N}$ the points such that $f(x) = k$ are only those in $\Big[\frac{k(k+1)}{2};\frac{k(k+3)}{2}\Big]$. Now, let $a = \frac{k(k+1)}{2}, b = \frac{k(k+3)}{2}$: to find the inverse you have to solve for $k$ $$\begin{cases} a = \frac{k(k+1)}{2} \\ b = \frac{k(k+3)}{2} \end{cases}$$ Simple algebra caluli lead to $$\begin{cases} k = \frac{\sqrt{8a+1}-1}{2}\\ k = \frac{\sqrt{8a+9}-3}{6} \end{cases}$$ but you can rewrite those expression by noticing that the image (arrival set of function) is $\mathbb{N}$, and retrieve $$\begin{cases} k = \Big\lfloor \frac{\sqrt{8a+1}-3}{2} \Big\rfloor+1\\ k = \Big\lfloor \frac{\sqrt{8b+1}-3}{2} \Big\rfloor+1 \end{cases}$$ hence $$f(x)=\Big\lfloor \frac{\sqrt{8x+1}-3}{2} \Big\rfloor+1$$

0
On

The function $$f(x)=\left \lfloor \frac{\sqrt{8x+1}-3}{2} \right \rfloor +1$$ does the job.

0
On

This surely looks like $f(x) = \lfloor g(x) \rfloor$ kind of chart and the fact that it knows the previous state suggests that it keeps history so it might be recursive in that sense. this leads to something like $$ x > 0: f(x) = \lfloor g(f(x-1)) \rfloor \\ x = 0: f(x) = 0 \\ x < 0: f(x) = undefined $$ In the light of thatsince the jump from one scale to other is also one this suggests the following: $$ x > 0: f(x) = \lfloor g(f(x-1)) \rfloor + 1\\ x = 0: f(x) = 0 \\ x < 0: f(x) = undefined $$ Since f is recursive, it can consist of other recursive functions such as $\Sigma$. So I think a function that satisfies the data set would be something like: $$ f(x): max(y) \in \mathbb{Z}_{\geq 0} ; \sum_{y=0}^{\infty} y \leq x $$

PS: I wrote the states of problem solving in this case.