Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Incubator Q&A

Welcome to the staging ground for new communities! Each proposal has a description in the "Descriptions" category and a body of questions and answers in "Incubator Q&A". You can ask questions (and get answers, we hope!) right away, and start new proposals.

Are you here to participate in a specific proposal? Click on the proposal tag (with the dark outline) to see only posts about that proposal and not all of the others that are in progress. Tags are at the bottom of each post.

Comments on What’s next? 0, 4, 8, 21, 52, 65, 96, ?

Parent

What’s next? 0, 4, 8, 21, 52, 65, 96, ? Question

+3
−0

What’s the next number in the following sequence:

0, 4, 8, 21, 52, 65, 96, ?

History

0 comment threads

Post
+0
−0

This is very likely not what you had in mind, but mathematically there are always ways to find the "next" number in a sequence.

The simplest is finding the differences between numbers, then the difference between those differences, etc, until you get to all zeros or a single number. Once you get to a single number, you declare all higher differences to be 0. This is the same as saying you consider the original sequence the output of a polynomial resulting from fixed increases in X. The method uses the lowest-order polynomial to fit all the points, then extrapolates new values from there.

Analysis applied to your sequence:

0    4    8   21   52   65   96
  4    4   13   31   13   31
     0    9   18  -18   18
       9    9  -36   36
          0  -45   72
          -45  117
             162

In this case we had to go all the way to a single number since none of the rows was all-zero. Of course there are an infinite number of possible answers. We pick the one that is most "simple" by declaring all higher deltas to be 0. Applied to your sequence, to find the next number we start at the bottom and compute the next row on the right:

0    4    8   21   52   65   96  532
  4    4   13   31   13   31  436
     0    9   18  -18   18  405
       9    9  -36   36  387
          0  -45   72  351
          -45  117  279
             162  162

The answer therefore is 532. Note that we have actually created a continuous function that returns the input values exactly, but that allows us to find the value anywhere. There are an infinite number of functions that can do that, so we added the additional constraint that it be a polynomial with the minimum necessary order.

Again, I understand this is very unlikely what you had in mind. However, it is as valid as any solution given your under-constrained problem.

History

1 comment thread

As you know you can fit a polynomial to any finite sequence of integers as you have done in your answ... (2 comments)
As you know you can fit a polynomial to any finite sequence of integers as you have done in your answ...

As you know you can fit a polynomial to any finite sequence of integers as you have done in your answer. However there is a ‘simpler’ answer that my daughter’s grade 6 class figured out in about 5 minutes. No high school or advanced math is required to get a more elegant solution. I prefer puzzles that require creativity but don’t require a lot of calculations.

Olin Lathrop‭ wrote 7 months ago

There are an infinite number of criteria you could have defined "next" by. That included many non-mathematical approaches. You could expect a sequence from the individual decimal digit values, letters or words the number represent in some encoding, exit numbers of a highway along a certain route, etc, etc, etc.

There is no single right answer, and no way to know if we happened to stumble on the answer you are thinking of.