# What are the values in this sequence [closed]

I have a trivia question to answer. What are the values (x,y,z) in this sequence

31,62,x,52,y,z,91

-

## closed as too localized by Did, Ｊ. Ｍ., Zev ChonolesDec 28 '11 at 19:16

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Any restrictions on x,y and z? Must be natural numbers? Can be negative? Can be fractions? –  Alex Aug 6 '11 at 11:06
Most likely natural, however any logical sequence is acceptable –  Aran Mulholland Aug 6 '11 at 11:09
ALL sequences are logical –  Andrea Mori Aug 6 '11 at 11:17
x=y=z=12.5+pi/4. –  Did Aug 6 '11 at 11:18
Aran: No apology is needed here. Instead, some answers to the specific points I raise would be appreciated. (I am curious to see how you would phrase the problem better, and again, this is a real question I ask here.) –  Did Aug 6 '11 at 11:53

Numbering these as $a_1$ through $a_7$, we have $a_k=13k$, except that the digits in $a_1$ and $a_2$ are inverted. The first digit is always the greater of the two, so the rule could be to sort the digits of $13k$ in descending order -- that would lead to $x=93$, $y=65$, $z=87$.

-
That's got to be it, we have branded it the dyslexic 13 times table :) cheers –  Aran Mulholland Aug 6 '11 at 11:31

HINT/EXERCISE: Given ANY $(x,y,z)\in{\Bbb R}^3$ there exists a polynomial $P(X)$ of degree $\leq6$ such that $$P(0)=31, P(1)=62, P(2)=x, P(3)=52, P(4)=y, P(5)=z, P(6)=91.$$

-
Are you implying that all exercises in IQ tests that ask you to continue sequences are meaningless (meaning more meaningless than IQ tests in general) and all continuations of all finite sequences are equally valid? –  joriki Aug 6 '11 at 11:27
@joriki: IQ tests tend to show how good people are at taking IQ tests. –  Did Aug 6 '11 at 11:34
I guess that the "what's the next number in the sequence" IQ tests questions mean to measure something different than mathematical ability, i.e. have little to do with mathematics itself, i.e. do not belong here. About the second part of your question, a real valued finite sequence can be extended to a function $f:{\Bbb N}\rightarrow{\Bbb R}$ in infinitely many ways. Is there a way to make objective the feeling that one extension is "better" (or "more logical") than another? –  Andrea Mori Aug 6 '11 at 11:41
@Didier: Sorry to take so long before I got to this. I fully agree about 42. I was born 42 days after the Apollo 11 landing and I'm turning 42 in a couple of days. About the code size: This comparison is more difficult than the one between Dalker's solution and mine, which are more similar. Yours requires an array of constants for the non-42 values, and it makes a big difference whether I make that array static or local. Compared to how I originally wrote up my solution to compare it with Dalker's, yours is 44 bytes shorter with a local array but 37 bytes longer with a static array. –  joriki Aug 27 '11 at 20:36
@joriki, glad to see you acknowledge the universality of 42. Thanks for your answer. Obviously you are much more expert than I am in these matters of complexity evaluation... but I shall try to understand what you wrote. Thanks again. (And a happy birthday!) –  Did Aug 27 '11 at 21:46

I don't know if this makes any sense, but considering all numbers present are naturals and less than 100, through some trial and error I found the following worked:

• add 31 to previous number if result is less than 92.
• if at some point result is greater than 91, flip result and number to be added (which then becomes 13)

So you'd get

• $u_1=31$
• $u_2=31+31=62=x$
• $u_3=26+13=39$ because $62+31=93>91$
• $u_4=39+13=52$
• $u_5=52+13=65=y$
• $u_5=65+13=78=z$
• $u_5=78+13=91$
-