News for hackers. Stuff that matters.
Re:The On-Line Encyclopedia of Integer Sequences by svat on Sunday April 18, 2021 @02:04AM (#26850177)
The best description of the OEIS I've heard is by Donald Knuth in this fun talk (https://youtu.be/BxQw4CdxLr8) where at 19:50 he says how it lets you "compute your way into the literature":

> For the last 30 years or more, there has been a wonderful tool for all kinds of problems of this form and it's been online for a long time: we have the Online Encyclopedia of Integer Sequences. And this is just the nicest thing since sliced bread for mathematics because you can compute your way into the literature. [audience laughter] If you want to know if anybody else has ever studied a problem, all you have to do is evaluate the first few cases of it and then you look it up and there it is. The hit rate is incredible, and all kinds of mathematicians have discovered each other through the OEIS. […] I donate to Wikipedia and the Internet Archive and the OEIS.

(Aside: A good blog post about that lecture: https://thenewstack.io/donald-knuths-christmas-tree-lecture-...)

Indeed I've used it this way many times; the most recent example is that I became curious about how many polynomial functions there are mod n (after posting this comment: https://news.ycombinator.com/item?id=26482028), and by computing the answers for n up to 10, I was able to look up up those numbers in the OEIS and find the general formula, and also the relevant papers. (Asked a question about it here: https://math.stackexchange.com/questions/4070051/how-many-di... but ended up answering it myself…) I don't think I'd have even known where to look (as I'm not a professional mathematician), if not for the OEIS. And this happens again and again.

Re:The On-Line Encyclopedia of Integer Sequences by bjoli on Sunday April 18, 2021 @08:17AM (#26851792)
I have answered more than a few "what does this code do?" by just doing that.

Feed the code some numbers, look for the output in oeis and bam! Instant guru status.

Re:The On-Line Encyclopedia of Integer Sequences by sn9 on Monday April 19, 2021 @04:20AM (#26860249)
What were the contexts in which you needed to examine a sequence of numbers transformed through a bit of code?

I'm assuming it's something more niche than CRUD development.

(I'm just curious, but would understand if it's something you can't talk about.)

Re:The On-Line Encyclopedia of Integer Sequences by bjoli on Tuesday April 20, 2021 @12:32PM (#26876954)
It is less exciting than you think. I am not a programmer by profession.

One example is here: https://www.reddit.com/r/scheme/comments/k3b3hg/need_a_littl...

I have other more recent (and better) examples, but most are in closed forums or IRC l.

Re:The On-Line Encyclopedia of Integer Sequences by glangdale on Saturday April 17, 2021 @10:51PM (#26849417)
Always great. A fine technique to compensate for those of us who lack mathematical sophistication: write some godawful brute force code to calculate the number of items in some construct of interest, then search those numbers up to learn all sorts of useful new things about what you have.

I learned about generalizations of the Fibonacci sequence and "half-Catalan numbers" by this method.

Re:The On-Line Encyclopedia of Integer Sequences by thuum7 on Sunday April 18, 2021 @03:56AM (#26850671)
Re:The On-Line Encyclopedia of Integer Sequences by imglorp on Sunday April 18, 2021 @09:30AM (#26852274)
Neil's got his own channel and just posted an accessible talk about cellular automata and other open problems. He could use some views!

https://www.youtube.com/watch?v=9ogbsh8KuEM

Re:The On-Line Encyclopedia of Integer Sequences by applecrazy on Sunday April 18, 2021 @12:08AM (#26849727)
The OEIS is so useful when I have some sequence and I have no clue how to efficiently implement it in code.

More often than not, there's a formula to generate the ith term in the sequence in close to O(1) time.

Re:The On-Line Encyclopedia of Integer Sequences by ColinWright on Sunday April 18, 2021 @11:23AM (#26853246)
I've been involved in a few of these sequences. The most recent is this one:

https://oeis.org/A294249

My early calculations have been superseded so I'm no longer mentioned, but I was involved in the initial calculations for this sequence:

https://oeis.org/A013998

It's an interesting and useful project. Any time you have a thing you don't understand it's worth finding some way of converting it to an integer sequence and then looking it up, just in case.

Re:The On-Line Encyclopedia of Integer Sequences by dang on Sunday April 18, 2021 @01:41AM (#26850075)
If curious, past threads:

The On-Line Encyclopedia of Integer Sequences - https://news.ycombinator.com/item?id=21366618 - Oct 2019 (28 comments)

The online encyclopaedia of integer sequences - https://news.ycombinator.com/item?id=18524115 - Nov 2018 (3 comments)

The On-Line Encyclopedia of Integer Sequences [pdf] - https://news.ycombinator.com/item?id=18015493 - Sept 2018 (4 comments)

The On-Line Encyclopedia of Integer Sequences - https://news.ycombinator.com/item?id=15900294 - Dec 2017 (1 comment)

Pictures from the On-Line Encyclopedia of Integer Sequences - https://news.ycombinator.com/item?id=11711212 - May 2016 (5 comments)

The Surprising Power of Neil Sloane’s Encyclopedia of Integer Sequences - https://news.ycombinator.com/item?id=10435690 - Oct 2015 (7 comments)

The On-Line Encyclopedia of Integer Sequences - https://news.ycombinator.com/item?id=9919535 - July 2015 (19 comments)

Neil Sloane: the man who loved only integer sequences - https://news.ycombinator.com/item?id=9380292 - April 2015 (2 comments)

The On-Line Encyclopedia of Integer Sequences - https://news.ycombinator.com/item?id=6650490 - Oct 2013 (20 comments)

The On-Line Encyclopedia of Integer Sequences - https://news.ycombinator.com/item?id=2496629 - April 2011 (7 comments)

The On-Line Encyclopedia of Integer Sequences - https://news.ycombinator.com/item?id=888577 - Oct 2009 (2 comments)

I thought there were larger ones...perhaps somebody will find one.

Re:The On-Line Encyclopedia of Integer Sequences by tshaddox on Saturday April 17, 2021 @10:17PM (#26849256)
I like the self-referential sequences, like “Numbers n such that OEIS sequence A_n contains n.” https://oeis.org/A053873
Re:The On-Line Encyclopedia of Integer Sequences by tromp on Sunday April 18, 2021 @02:53AM (#26850372)
I like the closely related "Numbers n such that OEIS sequence A_n doesn't contain n.”
Re:The On-Line Encyclopedia of Integer Sequences by alufers on Sunday April 18, 2021 @06:49AM (#26851393)
I like how everybody here uses this website for some profound mathematical purposes, but I once won a cordless drill due to the OEIS in high school. At some hackathon Bosh had a booth with a contest where you had to solve puzzles which consiststed mainly of finishing integer sequences. I remembered this encyclopedia and I found all of them on the oeis.
Re:The On-Line Encyclopedia of Integer Sequences by YetAnotherNick on Sunday April 18, 2021 @07:01AM (#26851445)
It is regularly used in coding contests too where some hard challenge can sometimes be found out to be some maths formula.
Re:The On-Line Encyclopedia of Integer Sequences by FabHK on Sunday April 18, 2021 @08:14AM (#26851785)
Yeah, OEIS also helps with quite a few Project Euler problems.

https://projecteuler.net

Re:The On-Line Encyclopedia of Integer Sequences by quakeguy on Sunday April 18, 2021 @01:56AM (#26850146)
Re:The On-Line Encyclopedia of Integer Sequences by bear8642 on Saturday April 17, 2021 @09:43PM (#26849078)
Thanks for reminding me of this.

It's very useful identifying known patterns and also discovering new patterns by entering random number strings

Re:The On-Line Encyclopedia of Integer Sequences by uyt on Sunday April 18, 2021 @02:00AM (#26850160)
Re:The On-Line Encyclopedia of Integer Sequences by lifthrasiir on Sunday April 18, 2021 @04:25AM (#26850770)
There is also an attempt [1] to collect and (largely) synthesize a program for every OEIS sequence in an intentionally constrained DSL.

[1] https://github.com/ckrause/loda

Re:The On-Line Encyclopedia of Integer Sequences by glangdale on Sunday April 18, 2021 @06:05PM (#26856917)
Thanks for this link. I am working on a superoptimizer and once had the thought that OEIS would be a cool place to look for workloads. It's gratifying that someone else is doing this and having some success.
Re:The On-Line Encyclopedia of Integer Sequences by forgotpwd16 on Sunday April 18, 2021 @07:06AM (#26851462)
>In total, there are currently more than 26,000 programs available

Wow, lot of work has gone to it. Why the decision to utilize an assembly language?

Re:The On-Line Encyclopedia of Integer Sequences by lifthrasiir on Sunday April 18, 2021 @07:14AM (#26851517)
As far as I can tell its assembly language is designed for fast synthesis and check (e.g. all programs are known to terminate). There is a "miner" generating programs and checking against existing sequences 24/7, a Twitter bot is also available [1].

[1] https://twitter.com/lodaminer

Re:The On-Line Encyclopedia of Integer Sequences by nickdrozd on Sunday April 18, 2021 @10:30AM (#26852779)
The OEIS is an amazing tool. I recently came across a sequence from an unusual source and then made the shocking discovery that the sequence already existed. It turned out to be a wild coincidence.

Write-up here: https://nickdrozd.github.io/2021/04/12/math-fact-busy-beaver...

Re:The On-Line Encyclopedia of Integer Sequences by RockofStrength on Sunday April 18, 2021 @09:57AM (#26852521)
The OEIS can also be considered a sort of number encyclopedia, especially for large numbers.

It can also be interesting to link geometric observations with unrelated OEIS sequences. For example, the number of rectangles on a square grid turned out to be the octagonal pyramidal numbers.

Re:The On-Line Encyclopedia of Integer Sequences by kingsuper20 on Sunday April 18, 2021 @09:39AM (#26852357)
I suggest a mega-CISC architecture where all of those sequences are represented by an opcode.
Re:The On-Line Encyclopedia of Integer Sequences by fdiskl on Sunday April 18, 2021 @12:55PM (#26854110)
I love this site. Often if I solve a Project Euler problem of the form "what is the xth element...", after I solve it, I will look at the first several elements in the sequence and start seeing where else the sequence is used.
Re:The On-Line Encyclopedia of Integer Sequences by roenxi on Sunday April 18, 2021 @08:48AM (#26851949)
https://oeis.org/A27

Looking at the URL, they got 26 sequences in (including the 0 sequence) before someone added the counting numbers.

Re:The On-Line Encyclopedia of Integer Sequences by Bostonian on Sunday April 18, 2021 @10:33AM (#26852816)
What programming language are the sequences coded in? Is the code available?
Re:The On-Line Encyclopedia of Integer Sequences by ColinWright on Sunday April 18, 2021 @11:16AM (#26853177)
The sequences are listed, and in each entry there are usually examples given of how to compute the sequence in multiple programming languages.
Re:The On-Line Encyclopedia of Integer Sequences by surfsvammel on Sunday April 18, 2021 @06:44AM (#26851375)
This is great for Advent of Code:)
Re:The On-Line Encyclopedia of Integer Sequences by forgotpwd16 on Sunday April 18, 2021 @07:03AM (#26851455)
There're few times some well-known sequences have appeared in AoC. Examples are Manhattan distances (OEIS:A214526) and square sums spiral (OEIS:A141481) in 2017d3, tribonacci (OEIS:A000073) in 2020d10, and Van Eck's sequence (OEIS:A181391) in 2020d15.