Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 677999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:06:03+00:00 2026-05-14T01:06:03+00:00

Ever since I started programming this has been something I have been curious about.

  • 0

Ever since I started programming this has been something I have been curious about. But seems too complicated for me to even attempt.

I’d love to see a solution.

1, 2, 3, 4, 5    // returns 6 (n + 1)
10, 20, 30, 40, 50   //returns 60 (n + 10)
10, 17, 31, 59, 115  //returns 227 ((n * 2) - 3)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T01:06:03+00:00Added an answer on May 14, 2026 at 1:06 am

    What you want to do is called polynomial interpolation. There are many methods (see http://en.wikipedia.org/wiki/Polynomial_interpolation ), but you have to have an upper bound U on the degree of the polynomial and at least U + 1 values.

    If you have sequential values, then there is a simple algorithm.

    Given a sequence x1, x2, x3, …, let Delta(x) be the sequence of differences x2 – x1, x3 – x2, x4 – x3, … . If you have consecutive values of a degree n polynomial, then the nth iterate of Delta is a constant sequence.

    For example, the polynomial n^3:

    1, 8, 27, 64, 125, 216, ...
    7, 19, 37, 61, 91, ...
    12, 18, 24, 30, ...
    6, 6, 6, ...
    

    To get the next value, fill in another 6 and then work backward.

    6, 6, 6, 6 = 6, ...
    12, 18, 24, 30, 36 = 30 + 6, ...
    7, 19, 37, 61, 91, 127 = 91 + 36, ...
    1, 8, 27, 64, 125, 216, 343 = 216 + 127, ...
    

    The restriction on the number of values above ensures that your sequence never becomes empty while performing the differences.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 507k
  • Answers 507k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer There is health monitoring: http://msdn.microsoft.com/en-us/library/ff650305.aspx. It has a bunch of… May 16, 2026 at 3:59 pm
  • Editorial Team
    Editorial Team added an answer It's technically ok as long as the libraries don't conflict… May 16, 2026 at 3:59 pm
  • Editorial Team
    Editorial Team added an answer I think you are looking for prototype inheritance. A list… May 16, 2026 at 3:59 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Every programming language I have ever seen has been based on the Latin alphabet,
edit4: wikified, since this seems to have morphed more into a discussion than a
Ever since I started programming properly using good old VB6 and up until present
Here is a problem I've struggled with ever since I first started learning object-oriented
I'm a novice at programming although I've been teaching myself Python for about a
I've been thinking about doing my own language (practicality: it's a thought experiment). One
I now develop websites and XML interfaces since 7 years, and never, ever came
Ok so I just read this question Do you ever use the volatile keyword
I mean a wrap function like this: function $(id) { return document.getElementById(id); } but
I’m having a little Architecture problem. In my project I have a Business Logic

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.