dcsimg
Results 1 to 3 of 3

Thread: Pattern: 1 2 6 14 27 46 72

  1. #1

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Candon City, Ilocos Sur, Phils.
    Posts
    11,033

    Pattern: 1 2 6 14 27 46 72

    What could be the formula for the following sequence of numbers: 1 2 6 14 27 46 72
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  2. #2
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    5,734

    Re: Pattern: 1 2 6 14 27 46 72

    What do you think the formula should look like?
    My initial stab at generating the series with code would be (using VB6):
    Code:
    Option Explicit
    
    Private Sub Command1_Click()
      Dim a As Integer, b As Integer, c As Integer, d As Integer
    
      a = 1
      b = 2
      Debug.Print a
      Debug.Print b
    
      For c = 3 To 7
        d = (b - a) + c
        a = b
        b = b + d
        Debug.Print b
      Next
    
    End Sub
    I don't know if that helps with determining a formula, or whether the above code could be simplified.
    "Anyone can do any amount of work, provided it isn't the work he is supposed to be doing at that moment" Robert Benchley, 1930

  3. #3
    Fanatic Member
    Join Date
    Nov 2017
    Posts
    930

    Re: Pattern: 1 2 6 14 27 46 72

    First step is to see if the differences of terms gives any insight into any formula used to generate the terms:

    1 2 6 14 27 46 72

    1st differences: 1 4 8 13 19 26
    2nd differences: 3 4 5 6 7
    3rd differences: 1 1 1 1

    Since the 3rd differences are all equal, that means the formula used to generate the terms is of 3rd degree in the form of:

    A(x) = a*x^3 + b*x^2 + c*x + d

    You have been given A(1) = 1, A(2) = 2, A(3) = 6, A(4) = 14, ...

    Using those given values, you can build a series of simultaneous equations that allow you to solve for the values of the coefficients a, b, c, and d.

    a + b + c + d = 1
    8*a + 4*b + 2*c + d = 2
    27*a + 9*b + 3*c + d = 6
    64*a + 16*b + 4*c + d = 14

    That's as far as I'll go for now. Good luck!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width