Can someone figure out the formula of this sequence?

In summary, the formula for the given sequence is a recursive formula where each term is the sum of the previous term and 1.5 times the difference between the previous two terms. Additionally, the third condition for the sequence has been revised to find the smallest integer a_n that satisfies the inequality 3*a_n > sum of all previous terms. This revision eliminates any ambiguity in the sequence and produces a consistent pattern.
  • #1
yellowcakepie
I needed help figuring out the formula for a sequence with these conditions:
1. The first term is 1.
2. All terms are positive integers.
3. 3 times each term (3*a_n) must be greater than the sum of that term and all the terms before it, but no more than 3 greater.

Operators like ceil() and floor() are probably needed, but I'm not certain.
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Did you find some elements manually? That will give an idea how a general formula might look like.

http://oeis.org can help as well if you have some elements.Edit: I moved the thread to our homework section.
 
Last edited:
  • Like
Likes yellowcakepie and arivero
  • #3
yellowcakepie said:
4. Operators like ceil() and floor() are probably needed.
I think you are wrong in this point, note that there are no floats here, and you are not asking for an approximation.
so perhaps you are confused because you are looking how to use them... I mean, you can always use conditionals or so.
 
  • #4
mfb said:
Did you find some elements manually? That will give an idea how a general formula might look like.

Yeah, I know a few terms of it.

1, 1, 2, 3, 4, 6, 10

On OEIS, it seems like this formula follows A130126, which seems quite complicated.

sqrt(Pi^2/2 + 4*log(phi)^2) * exp(sqrt((Pi^2 + 8*log(phi)^2)*(n/2))) / (4*Pi*n)
where phi is the golden ratio (1+sqrt(5))/2.

I'll check on this later. Thank you!
 
  • #5
I still do not get your condition,
"3 times each term (3*a_n) must be greater than the sum of that term and all the terms before it", ok
3 a_n > a_1+... + a_n
"but no more than 3 greater."
?? What does that mean? 3 (a_1+...+a_n) > 3 a_n ?
 
  • #6
arivero said:
I still do not get your condition,
"3 times each term (3*a_n) must be greater than the sum of that term and all the terms before it", ok
3 a_n > a_1+... + a_n
"but no more than 3 greater."
?? What does that mean? 3 (a_1+...+a_n) > 3 a_n ?

That means a_n must be the smallest integer possible where 3*a_n is still greater than ∑a_i from i=1 to i=n. So 3 >= 3*a_n - ∑a_i from i=1 to i=n > 0.
Sorry, I don't know how to format on this forum...

Using the sequence I wrote above, we can test it and use it as an example:
a_7 = 10. That means 3*a_7 = 30. It must be greater than the sum of itself and all the terms before it, but no more than 3 greater.

30 - (1 + 1 + 2 + 3 + 4 + 6 + 10) = 30 - (27) = 3, which is less than or equal to 3, so it is the only correct term for a_7. It cannot be any other number.
 
  • #7
Do you have to find an explicit formula (you have one, it is just messy) or is a recursive formula sufficient?
 
  • #8
maybe solve a simpler problem first?

your condition that

##3 a_n \gt \sum_{i=1}^n a_i##

can be more simply written as

##2 a_n \gt \sum_{i=1}^{n-1} a_i##

For example: the simpler problem would be: ##a_n \gt \sum_{i=1}^{n-1} a_i##

This suggests a sequence of doubling.

e.g. 1, 2, 4, 8, 16, 32...
 
  • #9
mfb said:
Do you have to find an explicit formula (you have one, it is just messy) or is a recursive formula sufficient?

I plugged the explicit formula into a sequence plotter, but every term is a noninteger, and does not match my calculations for the first 7 terms. Very strange.

A recursive formula is okay as well.
 
  • #10
yellowcakepie said:
A recursive formula is okay as well.
That is much easier to find. If you have the first n values, can you write an equation including the next one? Or maybe inequalities first?
 
  • #11
mfb said:
That is much easier to find. If you have the first n values, can you write an equation including the next one? Or maybe inequalities first?

I think I already found it, but it's a little inconsistent.

a(n) = 1.5(a(n-1)-a(n-2)) + a(n-1)

Sometimes it is a decimal, 1 too high, or 1 too low.
 
  • #12
I get a different sequence, for example, 9 is the smallest number where 3x9 > sum {1,1,2,3,4,6,9}.

Code:
sequence: 1   1   2   3   4   6   9  14  21  31  47  70 105 158 237
sum:      1   2   4   7  11  17  26  40  61  92 139 209 314 472 709

There's a formula for the sum. I don't know if this could be converted into a formula for the sequence.

Code:
sum[i] = 1+⌊3(sum[i-1])/2⌋
seq[i] = sum[i]-sum[i-1]
 
Last edited:
  • #13
yellowcakepie said:
I needed help figuring out the formula for a sequence with these conditions:
1. The first term is 1.
2. All terms are positive integers.
3. 3 times each term (3*a_n) must be greater than the sum of that term and all the terms before it, but no more than 3 greater.

Operators like ceil() and floor() are probably needed, but I'm not certain.

People have asked you about the following, but you have refused to answer. Does the second condition mean
$$\text{(1) this:}\;\;\; 3a_n \leq \sum_{i=1}^n a_i + 3 $$
or
$$\text{(2) this:} \;\; 3 a_n \leq 3 \sum_{i=1}^n a_i?$$
Just tell us if it is (1) or (2).
 
  • #14
Ray Vickson said:
People have asked you about the following, but you have refused to answer. Does the second condition mean ...
I suggest changing the third condition to the smallest integer ##a_n## such that
$$3\ a_n \gt \sum_{i=1}^n a_i$$
or to "no more than 2 greater":
$$\sum_{i=1}^n a_i \lt \ 3\ a_n \le 2 \ + \ \sum_{i=1}^n a_i$$
Either of these conditions will produce the same sequence, and this eliminates the issue where the 7th term could be either 9 or 10.
 
Last edited:
  • #15
rcgldr said:
I get a different sequence, for example, 9 is the smallest number where 3x9 > sum {1,1,2,3,4,6,9}.

Code:
sequence: 1   1   2   3   4   6   9  14  21  31  47  70 105 158 237
sum:      1   2   4   7  11  17  26  40  61  92 139 209 314 472 709

There's a formula for the sum. I don't know if this could be converted into a formula for the sequence.

Code:
sum[i] = 1+⌊3(sum[i-1])/2⌋
seq[i] = sum[i]-sum[i-1]
Yeah, the sequence you made is correct. I screwed up some arithmetic when I was just trying to write my reply.
 
  • #16
Ray Vickson said:
People have asked you about the following, but you have refused to answer. Does the second condition mean
$$\text{(1) this:}\;\;\; 3a_n \leq \sum_{i=1}^n a_i + 3 $$
or
$$\text{(2) this:} \;\; 3 a_n \leq 3 \sum_{i=1}^n a_i?$$
Just tell us if it is (1) or (2).

(1), I think I answered that question a while ago with a reply to someone else.
 
  • #17
Looks like there no way to avoid having some type of second variable in order to generate this series:

https://oeis.org/A005428

Maybe the original third condition where 3an is no more than 3 greater as opposed to no more than 2 greater allows a single variable formula to be used for a different series, although with the condition being no more than 3 greater allows for variations, such at the 7th element being either 9 or 10.
 
Last edited:
  • #18
rcgldr said:
Looks like there no way to avoid having some type of second variable in order to generate this series:

https://oeis.org/A005428
Some observations...

Asymptotically, the ratio of consecutive terms must converge to 3/2.
It seems that for pairs in which the first is even the ratio is exact; where the first term is odd, it alternately rounds up and rounds down. E.g. 1 to 2 rounds up, 3 to 4 rounds down, 9 to 14 rounds up, 21 to 31 rounds down...
If that last observation could be characterised in terms of the value of the first of the pair (e.g. its value mod something) then the recurrence relation could be written without a summation.

Edit:
Looks like I have come close to characterising the rounding.
If a term is even, next term is exactly 3/2 times it, else
if it is 2, 3 or 5 mod 9 then round up, else
round down.
This works for the first 53 terms, but the 54th rounds the wrong way.

Curiously, no odd terms are 8 mod 9.
 
Last edited:

1. Can anyone figure out the formula of a sequence?

Yes, it is possible for someone to figure out the formula of a sequence. However, it may require a lot of time and effort, and there is no guarantee that a formula can be found for every sequence.

2. How do you find the formula of a sequence?

To find the formula of a sequence, you need to analyze the pattern of the numbers in the sequence. This can involve looking at the differences between consecutive terms, the ratios between terms, or any other patterns that may emerge. Once you have identified the pattern, you can use algebraic techniques to find the formula.

3. Is there a specific method or algorithm for finding the formula of a sequence?

There is no one specific method or algorithm for finding the formula of a sequence. Different types of sequences may require different approaches. Some commonly used methods include the method of finite differences, the method of undetermined coefficients, and the method of generating functions.

4. Are there any online tools or resources that can help in finding the formula of a sequence?

Yes, there are many online tools and resources available that can help in finding the formula of a sequence. These include sequence solvers, online calculators, and mathematical software programs. However, it is important to understand the underlying concepts and methods before using these tools.

5. Why is it important to find the formula of a sequence?

Finding the formula of a sequence can help in understanding the underlying pattern and behavior of the sequence. It can also be useful in predicting future terms of the sequence, making calculations easier, and solving related problems. In addition, it can be a fun and challenging problem for those interested in mathematics and problem-solving.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
264
Replies
8
Views
908
  • Precalculus Mathematics Homework Help
Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
Replies
10
Views
1K
  • Precalculus Mathematics Homework Help
Replies
8
Views
1K
  • Precalculus Mathematics Homework Help
Replies
12
Views
3K
  • Precalculus Mathematics Homework Help
Replies
8
Views
3K
  • Precalculus Mathematics Homework Help
Replies
11
Views
2K
Replies
3
Views
1K
  • General Math
Replies
1
Views
1K
Back
Top