Guys please don't downvote my blog. I genuinely need the help. My doubt is if I am given a sequence 1,2,4,8,15,26,... Then how to find a closed formula for this series in this case. please help me. I know this is not relevant to cp. But it will genuinely help to understand the mathematical computation regarding solving subproblems.

As far as i have read this involves polynomial fitting. How to solve this by polynomial fitting . please kindly help.

You can use The On-Line Encyclopedia of Integer Sequences. For your sequence it gives several variants. For example

`C(n+1,3) + n + 1`

.I am familiar with this website. But i really want to develop the skill of finding close formulas using polynomial fitting which comes under discrete mathematics. so if you know this skill please kindly help. It might help me in doing mathematical computation. Afterall having mathematical maturity will be essential in solving subproblems and will certainly help me in future contests.

I have never heard of polynomial fitting before reading this blog. I think it is safe to say this technique is not going to be helpful in CP contests.

Edit: My bad, I thought polynomial fitting is completely different from

polynomial interpolation, which is useful as it is exact. Lagrange interpolation could be a useful technique in your case.Resource: https://brilliant.org/wiki/lagrange-interpolation/

CP blog (keep in mind I haven't read it): https://codeforces.com/blog/entry/82953

Edit: This is wrong

Polynomial fitting only works when the equation is a polynomial. Most of the time in CP the sequence we want to find polynomial cannot be represented as a polynomial. For example the formula $$$n+1 \choose 3$$$ $$$ + n + 1$$$ that was mentioned above cannot be found with polynomial fitting. More likely than not, trying to use polynomial fitting will result in a false positive that is completely wrong.

isn't C(3,n+1)+n+1 a polynomial?

?

??

???

????

???

??

?

It is i was mistaken

You know it already: Polynomial Fitting. If you have enough sequence items you can construct first differences sequence, then second differences sequence and so on till you get the sequence with the same numbers (if you couldn't reach such sequence with equal numbers then initially you deal with not polynomial sequence). For your sequence:

First diffences: 1, 2, 4, 7, 11Second differences: 1, 2, 3, 4Third differences: 1, 1, 1Now you can assume that the initial sequence is generated by some polynomial with degree $$$3$$$:

You should determine the coefficients $A$, $$$B$$$, $$$C$$$ and $$$D$$$. With zero value for $$$n$$$ you can find offhand that $$$D = 1$$$. Substututes values $$$1, 2, 3$$$ for variable $$$n$$$ you get the following system of equations:

or

Now you have the desired formula.

you are write,but wkoframalpha is a

https://www.wolframalpha.com/input?i2d=true&i=interpolation+1%5C%2844%292%5C%2844%294%5C%2844%298%5C%2844%2915%5C%2844%2926