
9,73,241,561,1081,1849,_?_ - seven
http://www.algebra.com/algebra/homework/Sequences-and-series/Sequences-and-series.faq.question.155130.html
======
perone
[http://www.wolframalpha.com/input/?i=9%2C73%2C241%2C561%2C10...](http://www.wolframalpha.com/input/?i=9%2C73%2C241%2C561%2C1081%2C1849)

~~~
markerdmann
Wolfram Alpha has been a bit of a disappointment in terms of natural language
parsing, but it's hard not to be impressed by the way it handles mathematical
inputs.

Does anyone know if the natural language parsing is showing improvement, or
does it still choke on most inputs?

~~~
wizard_2
I'm quite impressed with the differences table.

    
    
        9 |  | 73 |  | 241 |  | 561 |  | 1081 |  | 1849
          | 64 |  | 168 |  | 320 |  | 520 |  | 768 | 
          |  | 104 |  | 152 |  | 200 |  | 248 |  | 
          |  |  | 48 |  | 48 |  | 48 |  |  |

------
osteele
The wonderful (satirical, but mathematically sophisticated) book Mathematics
Made Difficult introduces difference tables, and uses them to demonstrate how
to compute the next number in the sequence [1,2,4,8,16,…] – that number being,
of course, 31.

This answer is correct in that it is the next item in the lowest-order
polynomial that generates the first five terms. This reveals both the strength
and weakness of difference tables (and the flavor of Mathematics Made
Difficult).

~~~
jacobolus
How does that work? Like this? That's not really following the "pattern"
though, which is to keep adding 1 down the left edge of the triangle. Choosing
to put a 0 in because we ran out of terms in our series is pretty arbitrary.

    
    
        1  2  4  8 16 31
         1  2  4  8  15
           1  2  4  7
            1  2  3
              1  1
               0

~~~
req2
Difference tables don't operate on a "pattern"- they simply take the
difference of the two terms above.

~~~
jacobolus
No, but the point is that using a difference table to find the "next term" in
a sequence is rather stupid if the difference table doesn't terminate until
you run out of terms.... the implication of that is that you have a sequence
which cannot actually be fully described via that difference table.

------
ComputerGuru
I read the title here which has no spaces between the numbers (a real pet
peeve :P) then went on to read the explanation of "Edwin's" attempts to solve
the blank. Except without the spaces, I thought he was trying to find the
remaining digits of a single number (with commas for thousands separator).

(before clicking the link, I was expecting "find the remaining digits to make
this number a prime" or something)

Nice link though!

------
JoeAltmaier
I discovered difference tables as a kid, didn't know they were used much, I
was modelling motion on a 2D display (an oscilloscope hooked to a P2P11!). Was
a lifesaver for quick polynomial evolution - uses only addition, execution
time scales linearly with the order of the polynomial. So, how do you go from
the difference table "coefficients" to the polynomial?

~~~
jonsen
Integrate the constant 48 back to the series level:

    
    
      48 -> 48x -> 24x^2 -> 8x^3
    

Subtract 8x^3 from the series

    
    
      9 - 8•1^3, 73 - 8•2^3, 241 - 8•3^3
    

and repeat the whole process on this series for the coefficient of x^2, etc...

~~~
SandB0x
Exactly. The other perspective: When you see 'difference', think 'derivative'
.

Approximately, what the difference table is doing is differentiating until the
leading term is constant. If we end up with a constant k levels down, we must
have had a.x^k in the polynomial, as the derivative of a.x^k = ak.x^(k-1).
Repeating this k times gives constant = a.k!

So the leading coefficient of the polynomial, a = constant/k!

I guess the next step is to subtract the values generated by this term from
the sequence, then repeat to find the next term in the polynomial...

------
fsniper
I hit my head to wall after reading this. Difference table is a really cool
way to solve this kind of questions. I thought "how come I have never learned
this difference table before". I could make better points with IQ tests with
difference tables :)

~~~
megamark16
I've never been particularly good (or confident?) at math, but this actually
piqued my interest, it's a very cool trick/technique. Maybe I should enroll in
a math class at the local community college just to try to improve myself a
little bit. Besides, I have so many more ways to actually apply what I'd be
learning now then I did when I took my last math class (which I think was back
when I was 16 or 17).

~~~
rw
You'll probably get farther with self-study. I suggest picking a field or two
(discrete mathematics, number theory, graph theory, topology, and abstract
algebra are probably the most useful and accessible ones to you right now) and
then meeting with a professor a few times a month to go over homework
problems.

Doing it that way will prepare you to teach yourself the material, giving you
the confidence you claim you don't yet have.

------
l0nwlf
Difference table only works in case of arithmetico-geometric series or
polynomial series. It fails in other sequences like fibonacci,prime etc.
However if given a sequence I always try difference table first as there are
high chances that it'll be cracked.

------
pfarrell
I learned about difference tables in Conway and Guy's great book "The Book of
Numbers". I wish the book had been available when I was an undergrad. It
describes everything I loved in math that I wasn't able to pinpoint. There are
so many little gems in it, I've spent months reading it halfway through and
then starting over to pick up what I missed. Highly recommended.
[http://www.amazon.com/Book-Numbers-John-H-
Conway/dp/03879799...](http://www.amazon.com/Book-Numbers-John-H-
Conway/dp/038797993X)

------
amichail
This question is not well-defined. Any number can be a solution.

~~~
bdr
Here's one interpretation: What will the simplest program that outputs these
numbers output next?

~~~
amichail
How will you prove that your answer is correct?

~~~
bdr
Well, that _could_ be done by brute force. Realistically, though, it's more
about whether anyone can beat your answer.

~~~
g__
You'd have to determine if a program halts. Unless you restrict to non-Turing-
complete language, this is undecidable.

~~~
jcl
You can simply modify your definition of "simplest" to be "shortest that
completes in a million steps" or some such. A program that takes so long to
finish that you're not sure it will return your desired value is probably not
the simplest.

------
moron4hire
Not to be too harsh here, but...

I've been using "difference tables" (without calling it that) since I was 10
years old. I don't mean this to be bragging at all, because I didn't think
(and still don't think) it was at all remarkable. It's just a basic method of
analysis.

~~~
pvandehaar
I home-schooled myself for a year and stumbled upon them, and decided to call
them "differentials" because I had heard that term before. It's also possible
I was had been sitting too close to my brother while he was studying them and
had forgotten about it for a time.

------
albertsun
<http://www2.research.att.com/~njas/sequences/>

This is a great resource for finding information on integer sequences
significant in combinatorics and other formal math topics. It didn't have the
solution to this particular sequence, because, afaik there is nothing
particularly interesting about it.

~~~
psyklic
Also of note is their Superseeker computer -- email it your sequence and it
will perform a lot of additional analyses on the sequence beyond the normal
web interface.

<http://www2.research.att.com/~njas/sequences/ol.html>

------
niyazpk
You can see a discussion about difference tables here:
<http://www.physicsforums.com/showthread.php?t=114995>

------
graywh
Was surprised to see this happen:

[http://www.wolframalpha.com/input/?i=0%2C1%2C2%2C4%2C8%2C16%...](http://www.wolframalpha.com/input/?i=0%2C1%2C2%2C4%2C8%2C16%2C32%2C64%2C128%2C256%2C512)

~~~
nixme
Works properly if you take out the 0 term:
[http://www.wolframalpha.com/input/?i=1,2,4,8,16,32,64,128,25...](http://www.wolframalpha.com/input/?i=1,2,4,8,16,32,64,128,256,512)

~~~
seven
This works with 0:
[http://www.wolframalpha.com/input/?i=0,1,2,4,8,16,32,64,128,...](http://www.wolframalpha.com/input/?i=0,1,2,4,8,16,32,64,128,256,512,1024)

~~~
jriddycuz
Yes but in the recurrence relation, it said "for all n >= 1". I guess the
additional term was the tipping point that let mathematica infer that the meat
of the sequence was for n >= 1.

------
redorb
I loaded into excel, then copy and dragged down to see what excel would say is
the next 2 answers ... I got the following

...1081,1849,[1890.067],[2248.467].... Now I just wonder how excel got these
answers :/

~~~
ajscherer
Drag down a few more cells and use a difference table on the resulting
sequence.

------
camccann
This method of computing successive terms of a polynomial actually has an
interesting place in the history of computers; the basic principle is the same
as that used by Charles Babbage's difference engine.

Wikipedia article on the difference engine:
<http://en.wikipedia.org/wiki/Difference_engine>

Just for fun, a difference engine built with Legos: <http://acarol.woz.org/>

------
sujaym
The series 9,73,241,561,..corresponds to:

2^3+1^2; 4^3+3^2; 6^3+5^2; 8^3+7^2; 10^3+9^2; 12^3+11^2; ?

Soln: 14^3+13^2 = 2913

------
bd
If somebody wants to try this method on different sequences, I made a simple
solver in JavaScript:

<http://alteredqualia.com/visualization/hn/sequence/>

------
roundsquare
Is there interest in people posting neat math puzzles on HN more frequently?
There's a few I really like and I would love to see what puzzles others have.

------
leif
oleis turns up nothing, sadly

------
tkahn6
Can anyone explain why it takes so long to find the equation differentially? I
understand that is subjective, but the 'constants' are only constant from y'''
to y''. From y'' to y' the 'constant' is linear (meaning you have to solve for
change in y' - y) and the 'constant' is quadratic from y' to y.

Basically you can't just integrate each DE and solve for a constant C by
finding the value of the lower order DE where x=1 and finding the difference.
Why not?

I'm in Calc BC in high school so this could be a stupid question.

~~~
jacobolus
This is just a sequence being modeled by a polynomial. The point of a
"difference table" is that when you take enough levels of differences (if you
like you can think of these as analogous in some way to derivatives, insofar
as each step of grabbing differences reduces the order of a polynomial
sequence by one power, but it's not really necessary), you eventually get down
to a constant, from which you can work backwards to figure out what the
patterns in higher-up differences are.

~~~
tkahn6
I'm aware difference tables can be used to find the final term in the sequence
- it's what I did to find the answer.

I was using differential equations to find the equation that describes the
sequence and I was wondering why the constant that you get when you integrate
a function isn't actually a constant after the second integration.

------
jtnak
why is this at the top?

~~~
iamwil
because it is interesting.

------
IsaacSchlueter
Please don't post your homework to the list.

