Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Direct way to calculate nth term of cyclically repeating function?

  1. Sep 15, 2005 #1
    "cyclic functions" may not be the correct term, but I don't know what else to call them. (only have basic high school math training, no calculus) Here's what I'm looking for.

    Given the following series of functions

    f(a) = b (step 1)
    f(b) = c (step 2)
    f(c) = d (step 3)
    ...
    f(n) = a (step n)

    Is there a general way to rework these so that you can directly calculate the value at steps 1,2,3 etc rather than having to iterate through all the steps from a to x, something like this?

    f(0) = a
    f(1) = b
    f(2) = c
    f(3) = d
    ...
    f(n) = a

    This problem arose from a computer program I'm working on and it would be much more efficient to directly calculate the n'th term rather than having to iterate through them all.

    Thanks for any help
     
  2. jcsd
  3. Sep 15, 2005 #2

    Tide

    User Avatar
    Science Advisor
    Homework Helper

    How about using the mod (modulo) function?
     
  4. Sep 15, 2005 #3
    Example?

    Here's a little more background. Using the Mandelbrot generating function Z1 = Z0^2 + c yeilds either:

    Escape set - values not in set
    Chaotic set - values don't escape but also don't settle into a repeating set of values
    Convergent set - values converge to either a single value or a repeating set of values

    Convergent values take the form
    f(a) = b
    f(b) = c
    f(c) = d
    ...
    f(n) = a

    With the above in mind, how would I apply your modulo suggestion?

    Thanks

    Ken
     
  5. Sep 15, 2005 #4

    Tide

    User Avatar
    Science Advisor
    Homework Helper

    That's a little different than what I thought you were asking in your original post. I'm afraid you're stuck with iterating.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Direct way to calculate nth term of cyclically repeating function?
  1. Nth term help? (Replies: 2)

  2. Fibonacci nth term (Replies: 9)

  3. Nth term (Replies: 5)

Loading...