3 ms·
Thank you. I spent far too long trying to figure out what sequence would start "1, 2, 4" and then have 232 be the 32nd item.
by ubernostrum 11y ago
Thank you. I spent far too long trying to figure out what sequence would start "1, 2, 4" and then have 232 be the 32nd item.
- haberman 11y agoOops, sorry! Fixed it.
- Someone 11y agoDon't be ashamed. http://oeis.org/search?q=1%2C2%2C4%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C232&sort=&language=&go=Search http://oeis.org/search?q=1%2C2%2C4%2C_%2C_%2C_%2C_%2C_%2C_%2... does not know it, either, it gives me http://oeis.org/A115346 http://oeis.org/A115346 That has 46 terms before hitting the right pattern. It also gives http://oeis.org/A188668 http://oeis.org/A188668 which has only four terms before hitting 1, -2, 4, ..., -232. I guess one could try and tweak either to get a matching sequence, but I don't see a trivial way to do it that is mathematically 'nice'. It is easier to start with http://oeis.org/search?q=0%2C0%2C1%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C_%2C200&sort=&language=&go=Search http://oeis.org/search?q=0%2C0%2C1%2C_%2C_%2C_%2C_%2C_%2C_%2..., though. It gives me http://oeis.org/A242067 http://oeis.org/A242067 "Number of triangular numbers between n^2 and n^3 (excluding the bounds)." So, this sequence 'must' be "n plus number of triangular numbers between n^2 and n^3 (excluding the bounds)."
- odbol_ 11y agoAnd therein lies the problem with Perl.