# How do you find the function that describes this sequence?

by Russelluke
Tags: equations, functions, sequences
 P: 144 I find the specifications of this sequence rather unclear. One guess, disregarding your cryptical sentence "it starts from one...", is that we are just talking about 14 different values modulo 390. If not, it would be informative if you could clearly include some numbers that does not fit that pattern.
 P: 791 The awesome Online Encyclopedia of Integer Sequences is a great resource for this type of question. https://oeis.org/ Your particular sequence isn't specified clearly enough for anyone to know what numbers are in the sequence. You can't just say, "It starts with x, y, and z and then there are 46 other numbers ..." and expect anyone to know what the sequence is.
P: 7

## How do you find the function that describes this sequence?

 Quote by SteveL27 The awesome Online Encyclopedia of Integer Sequences is a great resource for this type of question. https://oeis.org/ Your particular sequence isn't specified clearly enough for anyone to know what numbers are in the sequence. You can't just say, "It starts with x, y, and z and then there are 46 other numbers ..." and expect anyone to know what the sequence is.
Thank you for the suggestion it showed me the correct way to display a sequence and it was stupid the way I showed it.

I search for it on that site but it picked up no results.
 P: 791 It's still unclear what the sequence of gaps is. You have 46, 96, 46, 182 ... Is there a pattern or algorithm for the gaps?
P: 7
 Quote by SteveL27 It's still unclear what the sequence of gaps is. You have 46, 96, 46, 182 ... Is there a pattern or algorithm for the gaps?
Yes there is a pattern for the gaps I included it in the algorithm I showed but it's not pseudocode so i don't know if it's understandable but close to the python language. If you take 141 and subtract 95 you get 46. So 46 is the gap between the third number in the sequence and the fourth. Otherwise the gap is just 1 as you can see there are sets of consecutive odd numbers. First a set of three consecutive odds, a big gap(46), then a set of four consecutive odds, another bigger gap(96) then a set of four consecutive odds and then another gap and so on.
But I think it's best if I just say here is the sequence
91,93,95,141,143,145,147,243,245,247,249,295,297,2 99,481,483,485,...up to infinity

Ignore everything else including the algorithm and try to see the pattern the sequence follows.

All I need is to find and equation to use for testing if a number belongs to this sequence.
If I knew a bit about maths I wouldn't have confused everyone but I'm trying to change that.
P: 7
 Quote by Norwegian I find the specifications of this sequence rather unclear. One guess, disregarding your cryptical sentence "it starts from one...", is that we are just talking about 14 different values modulo 390. If not, it would be informative if you could clearly include some numbers that does not fit that pattern.
The sequence is:
91,93,95,141,143,145,147,243,245,247,249,295,297,2 99,481,483,485,...

Thank you for pointing out the need for clarification I was very unclear the way I described it and yes the starting point was totally wrong it's not 1 but 91.

I hope that helps a bit, if it does I would much appreciate any further help.

Thanks again
 P: 144 OK, if there is nothing else to this sequence, your code to check x for inclusion would be: S = list of the 14 first numbers in the sequence. y = x mod 390 if y in S then: YES else: NO
P: 7
 Quote by Norwegian OK, if there is nothing else to this sequence, your code to check x for inclusion would be: S = list of the 14 first numbers in the sequence. y = x mod 390 if y in S then: YES else: NO

It works!!!

The solution seems so simple it's almost embarrassing. But before I say anything else, THANK YOU NORWEGIAN!

I'm still fiddling with a calculator and pen and paper but I simply cannot figure out how you got it. If I had to guess I'd say it's got something to do with factors or multiples of some property of the first iteration of the sequence? I dinno, but if your still around I would kill to know.

Thanks again.
 P: 7 Ok I figured out where the 390 comes from. The length of each iteration of the algorithm is 390(from 91 to 481). So it's the difference between the 1st number in the sequence and the 15th. Yet I know that the mod operator calculates the remainder. I can't yet understand how it works in this equation. ---------------------------- I think I'm getting warmer, so far I've established this much but not 100% sure if it's correct. There are two types of integer sequences. One is where the algorithm modifies itself, as in if the algorithm takes a value from the list it's creating to create the next value like the Fibonacci sequence. The other is where the algorithm works independent of the sequence it's creating so the length between the first number in the sequence and the first number of the next run of the algorithm will always be the same. Having identified that this sequence is of the second type you only need to list the number in one run of the algorithm and also note the length of integers between the first run and second. Then the equation to test for inclusion will always be: list = numbers in first run of algorithm. x = random number y = difference between first number in first run and first number in second run z = x mod y if z in list: True else: False Is all of that correct, if so I'll save it somewhere as I'll be using it allot in future. One more long shot question, is it possible to combine two or more sequence and use the same or similar method to test for inclusion?

 Related Discussions Introductory Physics Homework 8 Advanced Physics Homework 2 Calculus & Beyond Homework 1 Math & Science Software 2 Linear & Abstract Algebra 20