# Questions tagged [sequence]

Questions on specifying order in and splicing of lists, including use of Mathematica Sequence objects.

164 questions
Filter by
Sorted by
Tagged with
48 views

### Limit of Sequence? [closed]

I have following sequence t1[n] whose convergence I want to check. I have taken f[n_] := 2^n and ...
38 views

### How to use commands such as SequencePredict to find the next element of a sequence that is not easily guessable?

I used SequencePredict to exactly predict the sequences of very many standard sequences, such as even numbers, primes etc. But this example failed. ...
• 1,398
28 views

### Problem with FindGeneratingFunction

I have a lengthy function of a real parameter $n$ that generates values $val$ for each $n$ {$n$, $val$}: ...
• 883
145 views

### Longest common subset sequence with gaps

I would like to find the longest common subset (including a gap of x) within two lists. Example: A = AAABBBBCCCCC B = CCCBBBAAABABA We can use ...
• 974
1 vote
92 views

### RSolve unable to solve the equation

I gave the following code as input: RSolve[x[n + 1] == 1/2 x[n] + 2 Log[x[n]], x[n], n] Mathematica gave the same output: ...
51 views

### Is there a concise way to generate a continuous less-than relationship?

Actually, I have a ton of variables, Let me simplify it to 4 in this post. vars = {a, b, c, d}; 0 < Less @@ vars < 10 0 < (a < b < c < d) < ...
• 23.1k
68 views

### How to solve this RecurrenceTable in Mathematica

I would appreciate if somebody could help me with the following problem: Q: How to define this in Mathematica. ...
• 127
70 views

### Variable dimension tables with variable ranges

I need to construct a table that has variable dimension and variable ranges (see for tables with variable dimensions and constant ranges, e.g., this question). Suppose there is a list ...
• 317
84 views

### A possible issue in combination of the Infix operator ~ with Sequence [closed]

There are other similar questions on this site about using the Infix operator for more than two arguments, which I have read. But there is one thing that I wasn't able to understand and couldn't ...
• 789
64 views

### FindSequenceFunction with very small numbers

I need some help with FindSequenceFunction because at the moment it seems like a black box to me. For example, it deals with ...
• 1,185
98 views

### Patterns are not Sequences are not Lists, or: Global Function Argument Reversal

H[z_] := z /. {F[p__] -> F[Reverse[p]]} F[{x, y}] + F[{x, z}] + F[{}] // H Almost. It gives an annoying "Nonatomic Reverse" error message at the ...
73 views

### Defining function with arguments in a specific pattern similar to Graphics[]

I'm trying to define a function that is of this form: ...
• 107
85 views

### Finding recurrence relation from an inexact numerical sequence

Consider the recurrence relationship d[0] = 0; d[i_] := (1 + Sqrt[1 + 4 d[i - 1]^2])/2 /; i >= 1 which generates the following sequence (generated by using <...
• 335
1 vote
28 views

### What subsequences does SequenceReplace consider

Consider SequenceReplace[{a, b, x, x, a, c}, {a, e_} :> e]. What subsequences does SequenceReplace consider? The ...
• 707
61 views

### Using :> vs -> in SequenceReplace

The first example on the page for SequenceReplace is the following: SequenceReplace[{a, b, x, x, a, c}, {a, e_} :> e] ...
• 707
1 vote
85 views

### Extract function argument sequence

Is it somehow possible to access and reference the sequence of arguments of a non-pure function? For example if I want to take the derivative with respect to the n'th argument, a pseudocode example ...
167 views

### Find the longest sequence of "1" in a SubList

I'm trying to return the sublist(s) with the longest sequence of 1, although my code is working in a majority of cases, there are exceptions that I don't understand . Example: ...
• 189
365 views

### Find the longest sequence of "1" in a matrix row, and its position

I would like to find the longest sequence of "1" (consecutive ones) in rows of a matrix; moreover, I would like to know the position of this sequence in the matrix . Example: Input : ...
• 189
69 views

### How to Map over a BlankSequence? [closed]

I would like to replace any function f[x, y, ...] in a certain expression with the same function with all its arguments squared, i.e. ...
• 107
78 views

### SequenceSplit around empty sequences is inconsistent

Bug introduced in 11.3 and persisting through 12.3 Only the first one recognizes a zero-length sequence between non-X's. ...
• 1,055
43 views

180 views

### How to judge whether the series is absolutely convergent?

I need to judge whether the series $\sum_{n=1}^{\infty}(-1)^{n}\left(1-\cos \frac{\alpha}{n}\right)$ (α>0) is absolutely convergent. ...
154 views

### How to find the limit of this recursive sequence

I want to find the limit of the following recursive sequence when n tends to : ...
250 views

### What does Sequence[2,4]^2 mean?

I am learning pattern matching. An example that confuse me is as follows. Foo[x__?EvenQ] := x^2; Foo[2, 4] which is equal to ...
107 views

Why does Head[Sequence[b, c]] return c[Symbol] and not Sequence? Why does ...
• 1,004
49 views

### Splice matching function arguments

Mathematica 12.1 introduces Splice that replaces the old way of using Sequence@@ to "melt" a list of entries. However, the ...
• 777
1 vote
38 views

### Apply SequenceReplace with a fixed shift

How can I apply SequenceReplace with a fixed prespecified shift instead of a shift equal to the length of the pattern, on a given list? E.g. ...
• 1,548
286 views

• 798
216 views

### The use of SlotSequence in If[#1 > #2, ##] &

The below function when applied to a list of two elements, will output the maximum between the two: If[#1 > #2, ##] & For example: ...
• 303
I am new to Mathematica. I want to convert a recursive formula to a non-recursive one using symbolic math. Specifically, I have a recursive formula similar to this: $a_n = f_a(c_{n-1}, x_{n-1})$ \$...