Finding number sequences in JS

I have played around with finding number sequences of the form a+b*c^d, where a/b/c/d can be the iterator x. The input is the first five numbers of the sequence. The JS code can be found here JSfiddle. It takes c 2.5 seconds to find all equations. This obviously doesn’t cover all interesting sequences, but might be a nice example how to use the eval() function for this.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">