Results 1 to 4 of 4

Thread: [RESOLVED] Seemingly complex pattern.

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    2

    Resolved [RESOLVED] Seemingly complex pattern.

    I have observed a pattern, but cannot figure out a formula to determine X over Y steps.

    See the images for the visualised pattern (cubes.gif), and how to create it in a spreadsheet(SS.gif).

    I could also post some VB code that'd ouput the sequence, but im tired (3AM).
    Attached Images Attached Images   

  2. #2
    Frenzied Member
    Join Date
    Jun 2006
    Posts
    1,098

    Re: Seemingly complex pattern.

    The formula in this code gives that pattern. Note the integer division.
    VB Code:
    1. Dim n As Long
    2.  
    3. For n = 1 To 10
    4.   Debug.Print (n \ 3 + 1) ^ 2 * (n \ 3 + n Mod 3)
    5. Next n

  3. #3
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397

    Re: Seemingly complex pattern.

    Also,
    It looks like you can break it up into 2 controlling variables, with this formula:


    Z = X3 + X2Y + XY(Y-1)/2
    Attached Images Attached Images  

  4. #4

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    2

    Re: Seemingly complex pattern.

    Yeah thanks guys, id just point out that your use of brackets is bad logophobic. Mightve worked in vb but not excel.

    (((n \ 3) + 1) ^ 2) * ((n \ 3) + (n Mod 3))

Posting Permissions

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



Click Here to Expand Forum to Full Width