Jump to content

Equation for a sequence


fredreload

Recommended Posts

I want an equation generator for a set number of sequences, it's not an infinite sequence. For instance 71,73,70,56, I want an equation that would always give me a correct number nth number within this series or even for a series like this 1,1,1,1,2,1,1,1,1. It could be random sequences, but eventually I want to reduce this sequence to an equation so I can always find the nth number within this series, any number after this nth sequence doesn't matter. How can I do this?

Link to comment
Share on other sites

Cool, I want an equation that would apply for any sequence,

[math]f(x)=sgn(abs(x-a_1))*b_1 + sgn(abs(x-a_2))*b_2 + .... + sgn(abs(x-a_n))*b_n[/math]

a1....n are indexes.

b1....n are values from sequence.

Edited by Sensei
Link to comment
Share on other sites

Cool, I want an equation that would apply for any sequence,

 

Corrected version:

[latex]f(x)=(1-sgn(abs(x-a_1)))*b_1 + (1-sgn(abs(x-a_2)))*b_2 + .... + (1-sgn(abs(x-a_n)))*b_n[/latex]

a1....n are indexes.

b1....n are values from sequence.

Edited by Sensei
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.