Is there (if not, why?) a software where I can input a sequence of integers, like into the OEIS, and then it makes some simple transformations on it to check whether the sequence can be obtained from some other sequence(s)?

For example, if I enter 2, 4, 6, 8, 10, then currently OEIS returns A005843: The nonnegative even numbers (which starts with 0, but OEIS can search for subsequences). But suppose that A005843 is not in the database yet. Then OEIS will not return anything. Instead, a more intelligent search software could return A000027: The positive integers.

I know that this raises several questions, like what transformations, which sequences to display first etc., but the feature could be quite useful. Even better, if the software could do more complicated things, like check whether my sequence is the sum of two OEIS entries.

ps. My motivation came from the sequence 2, 4, 9, 16, 27, 38 currently missing from OEIS, which was posed on this Hungarian puzzle page. (The puzzle has already expired, so feel free to discuss.)

  • $\begingroup$ The whole point is to decide what is the meaning of "simple transformations". $\endgroup$ – YCor Mar 14 '18 at 10:07
  • 1
    $\begingroup$ @YCor The whole point of what? $\endgroup$ – domotorp Mar 14 '18 at 10:33
  • $\begingroup$ If you make an algorithm for something one general rule is to decide what the algorithm computes, isn't it? Here the input would be a few terms of a sequence, and the output would be the set of sequences "simply related by some mathematical rule" to the sequence. We can agree that there's no way to formally define this. Still, I agree that there are some most obvious transformations which we can stick with, but even this is not so obvious... (1) passing from $(u_n)$ to $(au_n+b)$; (b) passing from $(u_n)$ to $(u_{an+b})$ (which is not reversible)? more things allowed? $\endgroup$ – YCor Mar 14 '18 at 11:27
  • 4
    $\begingroup$ In what way is "the positive integers" an intelligent return for the even positive integers? Oh, and are you familiar with the "superseeker" option at OEIS? $\endgroup$ – Gerry Myerson Mar 14 '18 at 11:51
  • 1
    $\begingroup$ @YCor (and OP), rethinking my comment, if all the software returns is "the positive integers" then I wouldn't consider that to be intelligent. But if it returns "dividing your sequence by the common factor 2, we get the positive integers," that I would consider to be intelligent. $\endgroup$ – Gerry Myerson Mar 14 '18 at 21:53

There has been some previous discussion on the OEIS mailing list about similar topics. For instance, about the sum of two sequences. (If I recall correctly, there was a university project that performed a more in depth search to find new combinations for existing sequences, but I can't seem to find the details now...).

For more of an answer to your question, I would check out this thread: http://list.seqfan.eu/pipermail/seqfan/2015-February/014455.html where a user links to some code (on github) which is currently implemented on a website http://www.sequenceboss.org/ (was a bit slow on first load for me).

Plugging in the above numbers gives me:

SequenceBoss thinks the sequence

$$(a_n)_{n≥1}=2,4,9,16,27,38,…$$ is generated by

$$a_n=(−1+n)^2+\text{prime}(n)$$ If true, the sequence continues




There is a "superseeker" option at OEIS which does something like what you are asking for.

  • 1
    $\begingroup$ "The second server, Superseeker, does not just look up the sequence in the OEIS, it will also apply a large number of algorithms in order to attempt to explain the sequence. Send a message to superseeker@oeis.org containing a line like [lookup 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31] (with no Subject line). The program will try VERY hard to find an explanation. Only one request may be submitted at a time, and (since this program does some serious computing), only one request per user per hour please. If there is no lookup line you will receive the help file for Superseeker". $\endgroup$ – YCor Mar 14 '18 at 12:27
  • 1
    $\begingroup$ Btw, the superseeker couldn't figure out the (in hindsight) rather simple rule for the sequence 2, 4, 9, 16, 27, 38. $\endgroup$ – domotorp Mar 14 '18 at 13:13
  • 1
    $\begingroup$ @domotorp I can't guess either the simple rule for this little sequence. We have $(2,4,9,16,27,38)=(1,4,9,16,25,36)+(1,0,0,0,2,2)$. What do you want to do with $(1,0,0,0,2,2)$??? $\endgroup$ – YCor Mar 14 '18 at 15:59
  • 1
    $\begingroup$ @YCor: Yeah, I can't figure it out either. I did notice that the first five elements are small powers of 2 and 3, but then 38 has me stumped. $\endgroup$ – Ilmari Karonen Mar 14 '18 at 16:10
  • 1
    $\begingroup$ The solution is already given in BurnsBA's answer. $\endgroup$ – domotorp Mar 14 '18 at 19:49

Perhaps worth mentioning here Sagemath's functionality to communicate with OEIS. (Sagemath is basically a large Python library).

Apart from searching, one can retrieve components of records, etc etc.

Another way to interact with OEIS in Sagemath is via FindStat, see here.

There is also a Haskell package with similar functionality.


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.