## how do I solve these number sequences?

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

kaplag
Posts: 2
Joined: Thu Mar 05, 2009 8:23 pm UTC

### how do I solve these number sequences?

Hello

Next week I have to do an IQ-test as part of a job application and I'm pretty sure part of it is solving as much number sequences as possible within a certain time limit. So I figured I should practice this on the internet however I found some number sequences I really can't seem to solve so can anybody please help me?

These are the sequences?

1 0 1 -1 2 …

and

-2 3 27 69 129 …

I found these on http://www.fibonicci.com/en/number-sequences-hard and they claim the right answer to the first sequence is -3 and on the second one the answer is 207 however I really don't see how, so can anybody please help me?

t0rajir0u
Posts: 1178
Joined: Wed Apr 16, 2008 12:52 am UTC
Location: Cambridge, MA
Contact:

### Re: how do I solve these number sequences?

Sequence problems are pointless. A sequence can be continued in pretty much arbitrarily many ways. That's what the OEIS is for (647 entries for the first sequence and none for the second). Don't trust a website that can't spell "Fibonacci" correctly (unless that's supposed to be some sort of horrible pun).

LLCoolDave
Posts: 165
Joined: Wed Apr 11, 2007 10:17 am UTC

### Re: how do I solve these number sequences?

I have to agree with t0rajir0u on the arbitrariness (is that even a word?) of number sequence problems. Nevertheless, a plausible solution to the first seems to be:

$a_{n} = a_{n-2} - a_{n-1} \;,\; a_0 = 1\;,\; a_1 = 0$

At least that fits the answer it should fit on. For the second it appears as if the difference increases by 18 every step, but the first number is one off then. No immediately plausible solutions come to my mind.

Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:

### Re: how do I solve these number sequences?

You should at least be able to recognize arithmetic sequences. Write out the first differences (subtract each term from the next term). If they're all the same, assume that this pattern will continue.

You might also see an easy-to-recognize pattern in the first differences, such as {2, 4, 6, 8}. If you see this and you don't have any other ideas, you should assume that whatever pattern you see continues.

If you want to take that idea to the next level, do the same with the second differences (subtract each term from the next term) and so on. But be aware that every time you go down a level, you're losing one term. So if you start with 5 terms, there'll only be 4 first differences and 3 second differences. That's less and less likely to constitute a helpful pattern.

t0rajir0u
Posts: 1178
Joined: Wed Apr 16, 2008 12:52 am UTC
Location: Cambridge, MA
Contact:

### Re: how do I solve these number sequences?

The only sequences that behave nicely (in a way that can be made precise) with respect to finite differences are sequences arising from linear recurrences. While this includes common sequences like polynomials, the powers of two, and the Fibonacci numbers, it's not adequate for dealing with sequences of a fundamentally different nature, such as the Catalan numbers. There are just too many interesting sequences to recognize for any particular quick-and-dirty algorithm to be able to find them. Again, that's what the OEIS is for.

Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:

### Re: how do I solve these number sequences?

Well excuuuuuuuuuuuuuuuuuuuuuse me for posting a suggestion that fails to identify every single interesting sequence in the whole wide world!

t0rajir0u
Posts: 1178
Joined: Wed Apr 16, 2008 12:52 am UTC
Location: Cambridge, MA
Contact:

### Re: how do I solve these number sequences?

My apologies; I wasn't trying to belittle your post, but to emphasize how pointless sequence problems are.

luvrhino
Posts: 61
Joined: Mon Nov 10, 2008 3:16 am UTC

### Re: how do I solve these number sequences?

LLCoolDave wrote:For the second it appears as if the difference increases by 18 every step, but the first number is one off then. No immediately plausible solutions come to my mind.

Right. The first term on the second sequence has to be -3, unless that sequence is extermely convoluted. I ended up figuring it out using trial-and-error/pattern recognition (e.g. 27 = 36 - 9) after doing the find the difference between the terms and then find the differnces between the differences method didn't work.

-3 = (0*3)2 - (1 * 3)
3 = (1*3)2 - (2 * 3)
27 = (2*3)2 - (3 * 3)
69 = (3*3)2 - (4 * 3)
129 = (3*4)2 - (5 * 3)
207 = (3*5)2 - (6 * 3)

kaplag
Posts: 2
Joined: Thu Mar 05, 2009 8:23 pm UTC

### Re: how do I solve these number sequences?

Thanks for your help everybody, the second is probably an error on the site then.

And to all of you who thinks this is pointless: It might be however like I already told you in my first post: I have to do an IQ-test to get a job and I already know that number sequences are a part of the test. In these tests it is always the aim to get the most obvious answer so I figured I should practice this. So I really don't care if it's pointless, I just want the job

GreedyAlgorithm
Posts: 286
Joined: Tue Aug 22, 2006 10:35 pm UTC
Contact:

### Re: how do I solve these number sequences?

t0rajir0u wrote:Sequence problems are pointless.

...what

Sequence problems are incredibly useful. They develop your intuition for finding good abstractions from a finite set of numbers. "Sequence problems" come up all the time in the (combinatorial subset of) the real world. Are you upset because there is more than one "possible" answer? Well, the real world doesn't care, and you still have to deal with the fact that you just brute-force-computed the first 6 terms of your problem and aren't sure where to go next.
GENERATION 1-i: The first time you see this, copy it into your sig on any forum. Square it, and then add i to the generation.

t0rajir0u
Posts: 1178
Joined: Wed Apr 16, 2008 12:52 am UTC
Location: Cambridge, MA
Contact:

### Re: how do I solve these number sequences?

Given that there are a large number of interesting sequences out there, and given the existence of the OEIS as a research tool, I don't think that learning how to recognize them based on their first few terms is a meaningful skill for more than the few most interesting sequences (say, Catalan and Bell), at least to the extent that there is a "right" and "wrong" answer (say, in a job application scenario). There is a wonderful example of the danger of extrapolation due to Plouffe: it can be shown that
$\int_{0}^{\infty} \prod_{k=0}^{N} \text{sinc} \left( \frac{x}{2k+1} \right) \, dx = \frac{\pi}{2}$
for [imath]0 \le N \le 6[/imath], where [imath]\text{sinc } x = \frac{\sin x}{x}[/imath], and one might conjecture that this continues to hold. In fact,
$\int_{0}^{\infty} \prod_{k=0}^{7} \text{sinc} \left( \frac{x}{2k+1} \right) \, dx = \pi \left( \frac{1}{2} - \frac{6879714958723010531}{935615849440640907310521750000} \right).$
A related result based on comparison to a sum holds for [imath]N \le 40248[/imath] and fails for all larger integers.

I'm not saying that numerical computation and extrapolation aren't useful things to do in mathematics. I'm just saying that penalizing a job applicant for getting an answer that isn't the answer you had in mind for a particular sequence problem isn't a good way to hire smart people.

garypenn
Posts: 14
Joined: Fri Feb 01, 2008 8:08 pm UTC

### Re: how do I solve these number sequences?

t0rajir0u wrote:I'm just saying that penalizing a job applicant for getting an answer that isn't the answer you had in mind for a particular sequence problem isn't a good way to hire smart people.

t0rajir0u's right on about that. If you're only given finitely many terms, you could certainly generate many reasonable answers. There are, of course, sequences where it is very clear what the list's author wants to see as the next term. I hope these are the sequences that would appear on some kind of aptitude test for a job--though I'd still object to such problems if I saw them for precisely the reasons that t0rajir0u mentioned.

Also, if I were to just list off 5 or 6 numbers without even thinking of some sequence behind them, one could think hard enough and invent one that wasn't even there to begin with--which further shows how pointless the exercise is.

Indeed, sequences appear in the real world--in the completely abstract world they'll come up--and recognizing patterns is a useful skill to have, but just because you see a pattern in some (real world) list of a few numbers, even if it matches each entry exactly, it doesn't mean you've found the pattern that generated those numbers.

Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:

### Re: how do I solve these number sequences?

t0rajir0u wrote:Given that there are a large number of interesting sequences out there, and given the existence of the OEIS as a research tool, I don't think that learning how to recognize them based on their first few terms is a meaningful skill....
Actually, learning to recognize simple patterns is very useful when using the OEIS. It even says as much in its hints section about "cleaning up" your sequence:
* If every other term is zero (e.g. 1 0 2 0 4 0 8 0 16 0 32 0 64 0 ...), omit these zeros, and look up 1 2 4 8 16 32 64 instead.
* If your sequence has an obvious common factor (e.g. 2 6 12 20 30 42 ...) try dividing it out and look up 1 3 6 10 15 21 instead.
See? They encourage you to make guesses. These patterns like every term being even might not hold out to N = 123456 but so what? You'll still be better at researching sequences if you can recognize the patterns than if you can't.

Rilian
Posts: 496
Joined: Mon Sep 10, 2007 1:33 pm UTC

### Re: how do I solve these number sequences?

kaplag wrote:
These are the sequences?

1 0 1 -1 2 …

and

-2 3 27 69 129 …

The first one looks like recursion with 1 and 0 being chosen as the first two arbitrarily and then the nth one is (n-2)th-(n-1)th.

I don't see anything for the second. But the answer can be anything. With a finite number of points, there are an infinite number of functions that can describe them.
And I'm -2.

t0rajir0u
Posts: 1178
Joined: Wed Apr 16, 2008 12:52 am UTC
Location: Cambridge, MA
Contact:

### Re: how do I solve these number sequences?

So I'll make this more general: there exist skills that are obviously good to have, and such that employers should want them in their employees, but such that they are unfair or otherwise difficult to test directly. For example, clearly you want to hire stockbrokers who can make good picks, but it would be both a waste of time and unfair to hire stockbrokers by telling a potential pool of applicants to pick out a virtual portfolio and hiring them based on the performance of the portfolio after a certain amount of time (although I'm curious if companies actually do this): the performance of the portfolio is affected by too many other factors besides the capabilities of the stockbrokers themselves.

And all I'm claiming is that pattern-recognition, at least in this form, is one of those skills.

luvrhino
Posts: 61
Joined: Mon Nov 10, 2008 3:16 am UTC

### Re: how do I solve these number sequences?

t0rajir0u wrote:For example, clearly you want to hire stockbrokers who can make good picks, but it would be both a waste of time and unfair to hire stockbrokers by telling a potential pool of applicants to pick out a virtual portfolio and hiring them based on the performance of the portfolio after a certain amount of time (although I'm curious if companies actually do this): the performance of the portfolio is affected by too many other factors besides the capabilities of the stockbrokers themselves.

Judging among very experienced stockbrokers, using their performance records could be useful and fair. As for newish applicants, there's no way to get a statistically significant sample within a few years, let alone during a standard interview cycle.

I'm ambivalent on what can be learned from the kind of number sequences above. To some extent, it's a learned skill (e.g. find the differences between the numbers and then the differences among the differences, being familiar enough with Fibonacci or square numbers to recognize related patterns on sight). This is a skill that someone can learn with practice, yet most likely has no practical value for the job. OTOH, giving problems like these in an interview setting can allow the interviewer assess one's problem solving skills and how their mind works.

t0rajir0u, out of curiosity, do you have the same opinion of pattern recognition questions that use shapes instead of numbers?

auteur52
Posts: 165
Joined: Sun Mar 23, 2008 11:08 pm UTC

### Re: how do I solve these number sequences?

I think these problems are valid if the interviewer does not hold the interviewee to one "correct" answer. In other words, they ask for an explanation of the pattern that is found. Interviewers ask brain-teasers like this mainly to analyze the applicant's thought process, and this would test that adequately. Of course, if they are interviewing someone with enough math knowledge, the answers/thought processes could get quite esoteric.

t0rajir0u
Posts: 1178
Joined: Wed Apr 16, 2008 12:52 am UTC
Location: Cambridge, MA
Contact:

### Re: how do I solve these number sequences?

luvrhino wrote:Judging among very experienced stockbrokers, using their performance records could be useful and fair. As for newish applicants, there's no way to get a statistically significant sample within a few years, let alone during a standard interview cycle.

That's my point - if you want to use past performance as an indication of future success, read a resume instead.

luvrhino wrote:t0rajir0u, out of curiosity, do you have the same opinion of pattern recognition questions that use shapes instead of numbers?

I'm ambivalent. It tends to be harder to come up with good alternate answers to those questions, and to a certain extent they're also a test of spatial ability, so they're a little more legitimate, but I still can't help but feel that questions like that miss the point.

Buttons
Posts: 858
Joined: Wed May 02, 2007 3:27 pm UTC
Location: Somerville

### Re: how do I solve these number sequences?

I think auteur52 is correct here. We shouldn't assume that serious employers are conducting evaluations of job applicants via Scantron. Rather, these sorts of tests are often oral, and the emphasis is usually on explaining the thought process.

gmalivuk
GNU Terry Pratchett
Posts: 26822
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

### Re: how do I solve these number sequences?

In a similar vein, I know of people who've had interview questions like, "Estimate the number of cans of paint sold in the US each year." They don't really care (or likely even have any good idea themselves) what the correct answer is, but they want to see what sorts of things you consider when trying to figure it out. So assuming you're given some opportunity for explanation, sequence/pattern recognition questions are perfectly valid job entry tools. If it's multiple choice, I do agree that it's kind of silly, because if you're not allowed to give feedback on how *you* figured out the next term, then you're right, it's unfair to penalize someone simply for not finding the very same arbitrary rule the test designers had in mind.

On the purely mathematical side, though, it's still good to be able to hypothesize about sequences, just like it's scientifically good to be able to hypothesize about any other finite set of data. Basically, you see a few numbers, hypothesize a rule and predict the next few, and then work through whatever more complicated problem you're doing to see if they match up. If they do, now maybe you try to prove the correspondence. Sure, OEIS can be used for this, but all it does is save you the work of coming up with equations yourself to make predictions. It doesn't change anything more fundamental than the amount of time you spend on a problem.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)