Hacker News new | past | comments | ask | show | jobs | submit login

Try putting two spaces at the beginning of a line to stop HN from eating the asterisks.

  > say 1, 2, 4, 2**32



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.


Don't be ashamed. 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

That has 46 terms before hitting the right pattern.

It also gives 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_%2..., though.

It gives me 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)."


Oops, sorry! Fixed it.


And therein lies the problem with Perl.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: