Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Didn't knew that something like that could be coded in Mathematica.


Indeed, Wolfram himself once solved a Google puzzle (to encourage job applicants) using Mathematica. It was, what's the pattern here, and what's the next row?

1 11 21 1211 111221 312211


I always find these puzzles odd

Why can't this row be valid?

1 11 21 1211 111221 312211 1 11 21 1211 111221 312211 1 11 21 1211 111221 312211 ....

Why does it have to be 13112221? Is it just a most close answer according to average math pupil's knowledge model psychologically?


Yeah, the "next # in the sequence" things are in theory dubious but in practice the theoretical unsoundness doesn't really cause issues (in the sense that: the people you'd want to select for will often find the pattern you want them to find, and many of the people you want to select against won't find that pattern).

The real meaning of what they're asking for is something like:

- I assert that there's a simple-but-nontrivial "algorithm" that generates this sequence. Find that algorithm, and use it to find the "next number in the sequence".

...but then you need a definition of "trivial", which is a lot of work (and most applicants know "trivial" when they see it:

  def sequence(i): return [1,11,21,1211,111221, 312211][i % 5] 
...is "trivial", so why bother explaining it that way when most applicants already "know" that's the wrong answer?

Doing a more-formal definition probably gets you into issues of Komolgorov complexity, which most applicants will not know much about.



But why Google when you can OEIS? http://www.research.att.com/~njas/sequences/


This is an awesome resource.


Only after they posted the puzzle did solutions pop up on their own search engine. :)




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: