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

learn more… | top users | synonyms

1
vote
1answer
48 views

How to deduce the Ramanujan's summation of this series?

I have already asked a similar question about Ramanujan's summation in general but received no good answers. Now I am interested in this exact series: $$\sum _{n\ge1}^\Re (24 n + 12 n^2)$$
0
votes
0answers
54 views

Switching ArcTan argument from a sequence to a list

The objective is to determine the angle formed by the line connecting two points in the plane, say p and q. The ...
4
votes
2answers
128 views

How can I use sequence in plotting domain?

I would like to plot a function but have a domain defined elsewhere as follows: xrange = Sequence[0, 2π]; Plot[Sin[x], {x, xrange}] However, this doesn't work ...
0
votes
1answer
44 views

Compute an indefinite sequence of And

I would like to compute a condition of normalization over a set of vectors which has the form $$ (x_1.x_1 =1 ) \land ...\land (x_n.x_n=1) $$ Where the $x_i$ are vectors, and $n$ is a variable fixed at ...
1
vote
1answer
54 views

Change input parameter order in a function

I'm a beginner in Mathematica programming and I'm trying to understand how input parameters work in Mathematica's function. I encountered a problem with the sequence/order of the input parameters of ...
0
votes
1answer
49 views

Beginner: Iterative Sequence for Vector Function

I want to create an iterative sequence for two Vectorfunctions, where both are dependent on the same variables and i represents the vector. For simplicity let's ...
18
votes
0answers
306 views

Performance problems in new Sequence functions

The new-in-10.1 Sequence* family of functions should provide newly optimized methods for handling sequence problems. Happily in some cases they do! For example ...
0
votes
1answer
44 views

Compute and Plot the element of a complex sequence

I'm new tho mathematica. I have a complex sequence ${z_n}$ with $z_0:=c$ $z_{n+1}=(z_n)^2+c$ for all $n\in N$ where c is some complex number, I need to plot the first 20 terms of this sequence ...
10
votes
2answers
247 views

How to implement symbolic Ramanujan's summation in Mathematica?

How to implement Ramanujan's summation in symbolic form in Mathematica? For instance, I want as input the function $f(x)=x$, as output $-1/12$, as input $f(x)=1/x$, as output $\gamma$ (Euler's ...
11
votes
1answer
292 views

Empty Blank regression in v10.1

Bug introduced in 10.1 and fixed in 10.2.0 In v10.1.0.0 on Linux, when Blank[] is used in Alternatives with pattern that can ...
0
votes
0answers
32 views

Does the two function for the same input leads to same output?

The first function is y[n_]:=x[n]+0.5*x[n-1]+0.25*x[n-2] the other is y[n_]:=a*x[n+1]+b*x[n]+c*x[n-1] Does exist some ...
1
vote
2answers
72 views

Plotting non-linear recursive sequence

I'm a total noob with Mathematica, and while trying to plot the following, I get several error messages. What am I doing wrong? ...
7
votes
5answers
270 views

How can I tally continuous sequences in a list?

I have a stream of data like this: 0001100111100000111111001110000001111111111000000111000111110000... (I can represent them as a list, like in {0,0,0,1,1,...}, ...
3
votes
2answers
118 views

Finding large Collatz Sequences, trying to improve speed

Background: I am already very much in love with Mathematica but I am also a novice. So far I have only gathered experience in procedural programming in Python. Generally speaking I am trying to ...
1
vote
1answer
43 views

Sequence not working in Manipulate?

I have a function that I would like to construct the Manipulate parameter list with Sequence. This is a simpler example but it ...
1
vote
0answers
77 views

Find algorithm or generator formula with automated procedure and pattern recognition

I am trying to find a generator formula for the discriminant of a polynomial and believe it would be an interesting problem for the Mathematica community to know how to automate evaluation of certain ...
1
vote
2answers
38 views

Imploying a sequence in a series

I would like to have the following sequence, $(a)_n$, in a series where $a_0 = 1$ and $a_n = a(a+1)\cdots (a+ n -1)$. The series I have is $$ 2\sum_{n=0}^{\infty}\frac{(1/2)_n}{n!(2n+1)^3} $$ I know ...
6
votes
5answers
238 views

Counting subsequences (i.e., patterns) within a list?

I would like to count the number of subsequences in list. Say I have data given by: data = {1, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1}; I would like to count the number ...
15
votes
2answers
1k views

What happens when you divide by ##?

I've been playing around with sequences a bit. In particular with using ## with unary and binary operators. Let's start simple, the following all make some kind of ...
0
votes
0answers
80 views

How to define a two-variable sequence?

I would like to define the following function but I am having a problem. I would like Mathematica to "understand" what I mean by writing "+...+". For example, for large values for $n$ and $m$ it takes ...
2
votes
0answers
55 views

pattern matching and applying a function, not working as expected [duplicate]

Consider the following code G[x, y] /. a_[b__] -> Total[a @@@ Permutations[List[b]]] I expect it to give G[x, y]+G[y,x] ...
2
votes
1answer
79 views

How to define the symbolic expression $V = \frac{1}{N} \sum_{i=1}^N ( y_i(g) - z_i)^2$ in Mathematica?

I want to define this expression symbolically: $V = \frac{1}{N} \sum_{i=1}^N ( y_i(g) - z_i)^2$ in which $\{y_i(g)\}_{i=1}^N$ is to be understood as a symbolic sequence that depends on a vector $g$. ...
0
votes
1answer
65 views

Single formula for this sequence [closed]

Consider the following sequence. 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8 We can express this sequence by (an) where an=n/2 when n is even and an=0 when n is odd. Find a single formula for an ...
1
vote
3answers
144 views

How to get mathematica to show limit of a recurrence sequence?

I want to find the limit of a such a sequence: $f(n+1)=\sqrt{2f(n)-1}, \, f(0)=a, a>1$ How does one do this? Is it possible to have it show the solution algebraically, like it does with ...
3
votes
3answers
118 views

Tangled up in sequences and recurrence relations

I took a trip through sequences and recurrence relations and I got tangled up since the documentation didn't help much. I'm sure you can. Given a sequence ...
6
votes
1answer
89 views

`FindSequenceFunction` for sum of hypergeometric terms?

The built-in function FindSequenceFunction is quite good at recognizing hypergeometric terms, i.e. terms $c_k$ for which $c_{k+1}/c_k$ is a rational function of ...
1
vote
2answers
90 views

Number of sequences with a certain condition

Suppose I have the sequence {2, 4, 6, 8, 10, 12, 14, 16}. How could I calculate the number of tuples so that for every term save the first one, the difference from ...
2
votes
3answers
132 views

Can you compute more terms in this sequence?

I am trying to identify a sequence related to the von Mangoldt function matrix. Since I believe/conjecture that the columns in the matrix have period lengths as in this sequence b: ...
4
votes
5answers
342 views

Sequence generation

If I wanted to generate a sequence that follows the pattern $$x_{n}=x_{n-1}+\dfrac{1}{2}\left(\sqrt{1-y_{n-1}\ ^{2}}-x_{n-1}\right)\\ y_{n}=y_{n-1}+\dfrac{1}{2}\left(\sqrt{1-x_{n}\ ...
0
votes
1answer
64 views

Sequence not working as expected [duplicate]

From the help page: f[a, Sequence[b, c], d] No problem at all. ...
9
votes
5answers
404 views

Repeating Digits

I have written ...
4
votes
2answers
567 views

How to find a recurrence relation for a numerical sequence?

This question was inspired by Vladimir Reshetnikov's question (How to find a recurrence relation for a sequence?): Given a finite sequence of numbers, how can we find in MMA a recurrence relation ...
7
votes
1answer
175 views

How to find a recurrence relation for a sequence?

I have a sequence given by an explicit formula for n-th term: ...
1
vote
1answer
70 views

How to Solve a Sequence in Mathematica [duplicate]

Given the input and the output, how do you interpolate a function in Mathematica? For example if you know that $f(1)=\frac{1}{2}$, $f(2)=\frac{1}{3}$, $f(3)=\frac{1}{4}$,... how would you solve for ...
4
votes
0answers
69 views

Does it help to do any preprocessing before `FindSequenceFunction`?

I am always amazed how smart FindSequenceFunction can be in discovering general term formula for a sequence of rational numbers. The documentation says it can work ...
2
votes
2answers
225 views

Defining a sequence slot programmatically

This question is related to: Composition of functions using slots `Slot` (#) interfering with evaluation Consider a toy example: ...
1
vote
1answer
146 views

Working with means and variances

My goal is to work out on the following equation: $$Mean(P)(1-Mean (P))\left (h + (1 - 2 h) (1 - \frac {Var (P)} {Mean (P) (1 - Mean (P))}) (1 - Mean (P)) + \frac {Var (P)} {Mean (P) (1 - Mean ...
0
votes
1answer
100 views

Graphing the sequence {$p_k$} = $\frac{c - a + dp_{k-1}}{b}$ [duplicate]

Graphing the sequence {$p_k$} = $\frac{c - a + dp_{k-1}}{b}$ I need to know how to graph this function where it automatically plugs in the previous term for $p_{k-1}$, the coefficients are of my ...
0
votes
1answer
84 views

Creating If statements programmatically [duplicate]

I want to write an algorithm that returns a sequence of numbers, starting from a specified point but stopping once a criterion has been reached. For example ...
2
votes
0answers
222 views

Faster Ways to compute recursive summation

It takes a long time to compute the summation below, and I'd like to know if there are some better ways to compute things faster. I have used $3$ ways to calculate, but they are very unsatisfactory. I ...
2
votes
1answer
70 views

Matching a list of sequences with common form

I am trying to find a pattern that matches a list of sequences that share a common form. The sequence form is: 1 followed by zero or more nonzero integers, followed by 0. An example list is: ...
1
vote
0answers
290 views

Limit of sequence

I tried to calculate the following limit $$\lim_{n\to\infty}n\sin(2\pi en!)$$ Mathematica gets ...
2
votes
2answers
111 views

Problem on Consecutive Sequence Sums that are Squares

Here is a seemingly simple Problem: I have two natural numbers n and m, n < m such that S1:= n +...+ m is a square and also S2:= n +...+ m + (m+1) is a square. Problem a) : Find n and m. You ...
2
votes
0answers
82 views

Limit[Sum[(2*E*n)^w/(w^(n/2+w)), {w,2,n}],n->Infinity]

I would like to show that the following (and other similar formulae) tends to zero. Limit[Sum[(2*E*n)^w/(w^(n/2+w)), {w,2,n}],n->Infinity] What's the right ...
1
vote
1answer
181 views

Defining a recursive integral sequence

I have a recursive integral sequence as follows: $$y_0(x)=1+r,$$ $$y_1(x)=-\frac{1}{\Gamma(a)}\int_0^x (x-t)^{a-1} y_0(t) dt,$$ $$\vdots$$ $$y_n(x)=-\frac{1}{\Gamma(a)}\int_0^x (x-t)^{a-1} y_{n-1}(t) ...
5
votes
5answers
3k views

How to detect if a sequence of integers is consecutive

I'm not a math-guy really (a programmer actually) and this is my first question. And excuse me if I can not explain my problem good. The problem is I have a sequence of integers and I want to detect ...
3
votes
0answers
76 views

How to combine DifferenceRoot objects for odd and even-indexed terms

I'm trying to analyze a certain infinite sequence $S$, indexed by positive integers starting from $1$. It can be split into two subsequences: $S^{odd}$ by removing all even-indexed elements and ...
3
votes
2answers
242 views

Generation function of recurrence sequence

I'm trying to find generation function of recurrence sequence ...
4
votes
3answers
208 views

Long waiting time for computing a summation

It takes a long time to compute the summation below, and I'd like to know if there are alternative ways to compute things faster. When replacing $15$ by $\infty$, then I should get $3^{1/3}$. I need ...