0

I'm working with some sequences and could be useful to know how to find a pattern behind them:

I currently have two sequences:

$8,20,20,20,24,36,36,36,40,52,52,52,56...$

$12,16,20,40,40,40,40,40,44,48,52,72,72,72,72,72,76,80...$

I can see the repeating patterns, but how do I write down $a_n= ... $?

The first one goes $(+12,+0,+0,+4,...)$ and repeats itself each time.

The second goes $(+4,+4,+20,+0,+0,+0,+0,+4,...)$

I want to know how to create the two an based on $(+12,+0,+0,+4,...)$ for the first and $(+4,+4,+20,+0,+0,+0,+0,+4,...)$ for the second.

Henry
  • 157,058
Frax
  • 485
  • 2
    "I can see the repeating patterns" Can you? Can you put those patterns into words? Are you sure that it is those patterns and not that it is just a coincidence and it is actually some different pattern different than yours that just happens to give the same start? – JMoravitz Nov 08 '21 at 14:43
  • If you can clarify what pattern it is that you want the closed form sequence for, then yes we can help. If you want to verify that this is in fact the correct pattern for the partial sequence you have written, that is impossible. It could have been one among many. Without more information there is no way to know how the sequences continue. – JMoravitz Nov 08 '21 at 14:44
  • A number pattern (pattern of numbers) is a sequence of numbers that has an underlying structure and develops according to some rule. Typically, the rule is some algebraic formula for the $n$th term. E.g. $2,4,6,8,10,\dots$ is specified by $a_n=2n.$ If you've indeed spotted the pattern, try to figure down the expression for $a_n.$ Some element of guessing-and-check may be involved. – ryang Nov 08 '21 at 14:46
  • 1
    I also doubt that you can see a clear pattern. I can't. Better tell us where these sequences are coming from. And provide longer samples. –  Nov 08 '21 at 14:46
  • The first one goes (+12,+0,+0,+4,...) and repeats itself each time. – Frax Nov 08 '21 at 14:48
  • The second goes (+4,+4,+20,+0,+0,+0,+0,+4,...) and repeats itself each time. – Frax Nov 08 '21 at 14:50
  • I think these sequences do suggest a possible closed form, which will not look particularly pretty. Finding it will be easier if you divide all the entries by $4$. Do follow @JMoravitz 's suggestion and [edit] the question to describe what you have in words. Tell us where the sequence comes from too. – Ethan Bolker Nov 08 '21 at 14:50
  • Indeed. But now what is your question ? Title or body ? –  Nov 08 '21 at 14:51
  • I want to know how to create the two $a_n$ based on (+12,+0,+0,+4,...) For the first and (+4,+4,+20,+0,+0,+0,+0,+4,...) for the second. – Frax Nov 08 '21 at 14:53

3 Answers3

2

Using zero-based indexes, $$a_{4n}=8+16n,\\a_{4n+1}=20+16n,\\a_{4n+2}=20+16n,\\a_{4n+3}=20+16n$$ and similar for the second sequence.

If you want a one-liner,

$$a_n=20-2(n\bmod4-1)(n\bmod4-2)(n\bmod4-3)+4(n-n\bmod4).$$

The second takes a more complex polynomial in $n\bmod 8$ (Lagrangian interpolator).

  • This is exactly what I was looking for. How do I generate the "one-liner" for the second one, too? Where do I learn? – Frax Nov 08 '21 at 15:07
1

Well, the true answer is that with limited information and without assuming that the pattern persists, you cannot come up with a unique rule $a_n$ that will be the sequence that you're looking at.

This is because, without assuming that the pattern persists, the next term in the sequence that you have been presented with could be literally anything.

Although, if you do assume that a pattern exists, then this is also a difficult question and depends entirely on the numbers you have been given and on luck. Even then, it is unlikely that you will come up with a unique representation of such a sequence of terms.

For the first sequence you have given, if we assume that the pattern persists, once can guess a representation of the pattern to be the following: $$ \begin{align} a_n = \begin{cases} 4(n+1) & n = 4k + 1 \text{ for } k \in \mathbb{N}_0 \\ 4(4k+5) & n = 4k+r \text{ for } k\in\mathbb{N}_0, r = 2,3,4 \end{cases} \end{align} $$

spaceman
  • 796
  • The pattern persists for both the sequences, I just haven't wrote the entire sequences down because... Well, they're infinite. – Frax Nov 08 '21 at 14:46
  • 1
    @AndreaFrasca Are you actually seeing numbers or seeing a number pattern? The whole point of a number pattern is that describing it does not necessitate exhaustively listing all its numbers, precisely because there is a (typically uncomplicated) pattern /rule governing it. – ryang Nov 08 '21 at 14:56
1

The first series can be written as recursive series in the following way $$\begin{align}a_1=&8\\ a_2=&20\\ a_3=&20\\ a_4=&20\\ a_n=&a_{n-4}+16, &\forall n>4 \end{align}$$ The second one can be written in a similar way. $$\begin{align}a_1=&12\\ a_2=&16\\ a_3=&20\\ a_4=&40\\ a_5=&40\\ a_6=&40\\ a_7=&40\\ a_8=&40\\ a_n=&a_{n-8}+32, &\forall n>8 \end{align}$$

miracle173
  • 11,049