कुंती के शेर आपदा धर्माराया दरिद्रता भीम सेना अर्जुन
Answers
The answer whoever set the homework was looking for is obviously 57. Let’s stipulate that.
The more interesting, and accurate answer is: the next number is whatever you want it to be. It can be any number between -infinity and +infinity.
In this case, set up a polynomial of the form:
f(n)=57+a.(n−8)+b.(n−8)2+c.(n−8)3+d.(n−8)4+e.(n−8)5+f.(n−8)6+g.(n−8)7
where n is the position of f(n) in the sequence provided. i.e. n=3 => f(n)=7 etc.
Solve for a through g. Clearly when n-8 = 0, i.e. when n=8, the 8th item in the sequence, the number we are being asked to predict, f(n) = 57.
Practically speaking you will have computational difficulties (rounding, overflow) etc., but in principle, that first element in the polynomial can be anything you want.
Here’s an R script that figures it all out - you just enter the “sequence” and the “naiveAnswer”, and it will figure out the polynomial for you: