1

I am curious how what function will map in the following way:

$$ 0 \to 1$$ $$ 1 \to 4$$ $$ 2 \to 7$$ $$ 3 \to 10$$ $$ 4 \to 13$$

etc.

I have been playing around trying to find a function for a bit now. I know that I can use: $$f: \mathbb{N} \to \mathbb{N}$$

$$ x \implies f(x)=3x-2$$

However, this shifts my inputs and omits zero as an input.

Also, I am hoping for more than an answer. I would like to get better at finding these sorts of sequences myself incase I need this skill later. So please give detail on how you determined a solution/approached the problem etc.

123
  • 1,748

2 Answers2

3

$f(x)=3x+1$ works.

You may want to learn about finite differences and Newton's series. See examples here, here and here. The bottom line is that polynomials can be seen as higher-order arithmetic progressions.

For your data, you'd get: $$ \begin{array}{llll} 1 & 4 & 7 & 10 & 13\\ 3 & 3 & 3 & 3\\ 0 & 0 & 0\\ \end{array} $$ Assuming that $3$'s in the second row of repeat forever, we get the formula $$ f(n)=1 \binom{n}{0} + 3 \binom{n}{1} = 1+3n $$

lhf
  • 221,500
2

For this sequence, notice that 1, 4, 7... are an arithmetic sequence with difference of 3. So, if you plot the points on a graph, you will get a line with slope 3. The standard form of any line is y = mx+b. In this case m = 3. So, you need to solve for b. Plugging in (0,1) gives you b is 1. Therefore, the line is y = 3x+1. Hence , the sequence is 3x+1.

Hope this helps.