Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

convert into formula

  • 02-08-2010 6:04am
    #1
    Registered Users, Registered Users 2 Posts: 28


    please convert the below(P) into formula using (m), or give an algorithm using (m) to get (P)

    m=2, P=0
    m=3, P=3
    m=4, P=3+5
    m=5, P=3+5+5
    m=6, P=3+5+5+7
    m=7, P=3+5+5+7+9
    m=8, P=3+5+5+7+9+9
    m=9, P=3+5+5+7+9+9+11
    m=10, P=3+5+5+7+9+9+11+13
    m=11, P=3+5+5+7+9+9+11+13+13
    m=12, P=3+5+5+7+9+9+11+13+13+15
    m=13, P=3+5+5+7+9+9+11+13+13+15+17
    m=14, P=3+5+5+7+9+9+11+13+13+15+17+17
    and so on

    I did not understand how to evaluate it into a formula


Comments

  • Registered Users, Registered Users 2 Posts: 5,083 ✭✭✭RoundTower


    you have already described an algorithm to get P.


  • Registered Users, Registered Users 2 Posts: 28 smslca


    RoundTower wrote: »
    you have already described an algorithm to get P.

    I didn't quite understand the algorithm. I didn't get that. can u explain for me.
    I mean, explain it using some variables.


  • Registered Users, Registered Users 2 Posts: 13,073 ✭✭✭✭bnt


    Do you want us to create a formula for the sum, something like:
    [latex]
    \displaystyle
    {n}=\sum_{m=2}^{\infty} m(m-1)
    [/latex]
    or such?. I don't think that makes much sense, and this is better expressed as an algorithm. For any value of m=2 or higher, the sum has (n-2) terms, and the terms depend on whether m is odd or even. That should be enough for you to write "pseudocode", any more and I'd be doing your work for you, which is not what this forum is for (see charter).

    You are the type of what the age is searching for, and what it is afraid it has found. I am so glad that you have never done anything, never carved a statue, or painted a picture, or produced anything outside of yourself! Life has been your art. You have set yourself to music. Your days are your sonnets.

    ―Oscar Wilde predicting Social Media, in The Picture of Dorian Gray



  • Registered Users, Registered Users 2 Posts: 35 Lexor


    Look at how your the 'pattern' is being built over as m increases. Taking m=14 as an example, we have:
    m=14, P=3+5+5+7+9+9+11+13+13+15+17+17

    To break it down into an algorithm, there is a clear sequence running though pattern.

    The 1st, 4th, 7th & 10th single terms are clearly in sequence, while the two in-between terms are dependent on the most recent single term.

    Can you see how the pattern is building up?


  • Registered Users, Registered Users 2 Posts: 5,083 ✭✭✭RoundTower


    bnt wrote: »
    the sum has (n-2) terms, and the terms depend on whether m is odd or even.

    instead of considering whether the terms are odd or even, I think it would be better to consider whether they are a multiple of 3, one greater than a multiple of 3, or one less than a multiple of 3.

    Set m = 3n + r, where r is 0, 1 or 2. And say P(m) = P(m-1) + x. Then express x in terms of n and r (the x is the last number in the sum in the formula OP gave). Then you will have a difference relation which, when resolved, should allow you to express P(m) algebraically.


  • Advertisement
Advertisement