1
$\begingroup$

Given a series of numbers how do I find the equation that describes the series?

For example given the following series of numbers...

$$352, 1424, 2528, 3664, 4832, 6032, 7264, 8528, 9824, 11152, 12512, 13904$$

The first differences are

$$1072, 1104, 1136, 1168, 1200, 1232, 1264, 1296, 1328, 1360, 1392$$ The second differences are all $32$

How can I find the function that describes this series.

Ultimately I am trying to determine which number in the series is a perfect square without doing trial division, There is a maximum of one perfect square in the series. My intention was to find the intersection of the set of perfect squares and the series above (and any other series that follows the same shape).

But before I worry about finding the intersection I am trying to understand how to convert a series of points into a function.

I hope that makes sense.

$\endgroup$
2
$\begingroup$

The second differences are all $32$.
The kth first difference is thus $1072+(k-1)32$
The terms of the series are thus: $$352+\sum_{k=1}^{n-1}(1072+(k-1)32)=352+1072(n-1)+32\frac{(n-1)(n-2)}2=16(n^2+64n-43)$$ Another way to look at it is: $$t_n={}^{n-1}{\rm C}_0\Delta_0+{}^{n-1}{\rm C}_1\Delta_1+{}^{n-1}{\rm C}_2\Delta_2+...$$ where $\Delta_0=32,\Delta_1=1072,\Delta_2=32,\Delta_{r,r\ge3}=0$ I hope you know about binomials for the C's.

$\endgroup$
  • $\begingroup$ This approach works if the numbers come from a polynomial, as they do here. $\endgroup$ – Ross Millikan Apr 3 '15 at 16:29
  • $\begingroup$ @RossMillikan I ask when can some numbers not come from a polynomial? $\endgroup$ – RE60K Apr 3 '15 at 16:32
  • 1
    $\begingroup$ for example, the sequence could be $1,2,4,8,16,32,\dots$ You can put a fifth degree polynomial through them, but it seems obvious that the sequence is $2^n$ . Another example is $1,320,2,342,78,9342923932,\dots$ which to my eye is "random". Again, you can put a polynomial through them, but I wouldn't trust it to predict the next number. In the original example, the fact that the degree of the polynomial is small compared to the number of terms gives confidence that it is correct. $\endgroup$ – Ross Millikan Apr 3 '15 at 16:36
  • $\begingroup$ yes it can be continued both ways but i ask why 2^n is correct-er than the polynomial approach? because it is most common? no. just because the framer kept 2^n while making the question. In any case this came in my exam and i used polynomial and then my answer would also be accepted as correct. Anyways OP already found that which i continued. I refrain from further argument since i am afraid i won't win it then.@RossMillikan $\endgroup$ – RE60K Apr 3 '15 at 16:39
  • $\begingroup$ we get many questions here on how a given sequence continues. They often receive (I think nasty) comments saying there are infinitely many ways to continue any given sequence. Although that view is mathematically correct, I believe it is intended that one see the pattern and continue it. I think it is perverse to continue $1,2,3,4,5,6,7$ with anything other than $8$. I believe the problem setter owes enough terms to make it "obvious" that the pattern is the correct one. This is more philosophy than math, however. $\endgroup$ – Ross Millikan Apr 3 '15 at 16:53
2
$\begingroup$

Hint

If you plot the numbers, they are along a parabola the equation of which being (easy to establish; just pick three data points) $$y(n)=16 n^2 + 1024 n − 688$$ In the post general case, try to run polynomial regression.

Edit

You noticed that the second difference is a constant. Make a link between the second difference and the second derivative; if the function is polynomial, then it must be quadratic. You can extend that to higher orders.

Edit

Let us suppose that the numbers can be represented by a polynomial, say $$a_n=\alpha +\beta n+\gamma n^2+\delta n^3$$ then the numbers of the first difference are given by $$b_n=a_{n+1}-a_n=(\beta +\gamma +\delta )+n (2 \gamma +3 \delta )+3 \delta n^2$$ the numbers of the second difference are given by $$c_n=b_{n+1}-b_n=(2 \gamma +6 \delta )+6 \delta n$$ the numbers of the third difference are given by $$d_n=c_{n+1}-c_n=6 \delta$$ So, as in the case of your post, the second differences are constant then $\delta=0$ and $2\gamma=32$ so $\gamma=16$.

Now, go backward as ADG showed.

$\endgroup$
  • $\begingroup$ I am not sure why your response was down voted. I upped it again but in truth while your response was accurate (I got the same from wolframalpha) I didn't understand how WA arrived at that ADG's response above gave me the insight i needed and hence my vote. $\endgroup$ – DeveloperChris Apr 3 '15 at 23:31
  • $\begingroup$ @DeveloperChris. I really appreciate. Thanks ! $\endgroup$ – Claude Leibovici Apr 4 '15 at 2:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.