# Tag Info

### How to raise a vector to powers contained in a vector, change the list into a product, and do this for all the lines of a matrix, efficiently?

Use Inner Inner[Power, var, #, Times] & /@ expo (* {x[1],x[2],x[3] x[4],x[2] x[5]} *)
• 2,960
Accepted

### Generate vectors with a certain property

Solution without recursion. gen[n_Integer?Positive] := FoldList[#2 (#1 + #2) &, 0, #] & /@ Tuples[{0, 1}, n - 1] For ...
• 43.1k

### How to raise a vector to powers contained in a vector, change the list into a product, and do this for all the lines of a matrix, efficiently?

This feels like I was just following the directions in the OP: Times @@ (var^#) & /@ expo
• 241k

### Issue with variable within Sum[] bounds

There appears to be a closed-form solution for specified values of $n$. I haven't found the general formula for when $n$ is some positive integer. Here are the results for $n=1, 2,\ldots,8$. (Note ...
• 42.4k
Accepted

### How to find intersecting linear equations between two lists?

Can intersect using Intersection once all right-hand-sides are zero. Just use Together on the quotient of left-hand-sides as the ...
• 59.9k

### Generate vectors with a certain property

This calls for a recursive function. ...
• 54.6k

### How to raise a vector to powers contained in a vector, change the list into a product, and do this for all the lines of a matrix, efficiently?

Here is another Inner strategy: Inner[OperatorApplied[Power], expo, var, Times]
• 31.7k

### How to find intersecting linear equations between two lists?

Follow the idea by @Daniel Lichtblau ( +1 ); Using RegionEqual( or ForAll[{x, y}, Equivalent[expr1, expr2]] // Resolve); ...
• 79.8k

### How to find intersecting linear equations between two lists?

Reduce the list SubtractSides/@List@@FullSimplify[Reduce[Or@@Join[list1,list2]]] (* {x + 2 y == 0, 3 x - y == 0, 3 x - 2 y == 0, x - y == 0} *) Sort by slope <...
• 37k

### How to find intersecting linear equations between two lists?

To get an overview, draw a picture: ...
• 54.6k

### How to optimize performance with DeleteDuplicates?

I build upon A. Kato's idea to use a normalization: First turn each element into a unique representative of the equivalence class. Then run vanilla DeleteDuplicates....

### How to optimize performance with DeleteDuplicates?

This answer is for the case where the order does matter. While OP's question asks for case where the order does not matter at any level. First of all rules can be ...
• 21.4k

### How to implement this zip function? zip[g,{f[{a,b}],f[{c,d}]}] to f[{g[{a,c}],g[{b,d}]}]

Inspired by @E. Chan-López and @Tapiocaweasel's answers, another variant is: zip[h_, expr : {f_[__] ..}] := f[h /@ Thread[{##}[[1]] & @@@ expr]]
• 165

### How to implement this zip function? zip[g,{f[{a,b}],f[{c,d}]}] to f[{g[{a,c}],g[{b,d}]}]

A variant of the @Edmund's answer is as follows: zip[h_, expr : {f_[__] ..}] := expr[[1, 0]][h /@ Thread[Splice@*List @@@ expr]] zip[g, {f[{a, b}], f[{c, d}]}] <...
• 29.3k

### How to implement this zip function? zip[g,{f[{a,b}],f[{c,d}]}] to f[{g[{a,c}],g[{b,d}]}]

Your case is very specific and as such the affect can be achieved with MapApply and Part. ...
• 43.1k

### How to find intersecting linear equations between two lists?

Something bland (as equations are linear 2D: ...
• 63.1k

### Standalone Table Invocation Using NextPrime to Generate Sequence of Division of Integers

Your description doesn't match you expected result. This reproduces your expected result: Divide @@ Comap[{#*2 &, Prime}][Range[10]] Since you asked ...
• 31.7k

### How to raise a vector to powers contained in a vector, change the list into a product, and do this for all the lines of a matrix, efficiently?

expo . Log@var // Exp (* {x[1],x[2],x[3] x[4],x[2] x[5]} *)
• 958
1 vote

### Issue with variable within Sum[] bounds

It's not really an answer. I think that does not have finite closed-form expression in terms of very large class of special functions. ...
1 vote
Accepted

### Transforming an expression into function

This is because Plot, like other similar functions such as Sum or Do, localizes its variable ...
• 321
1 vote

### Standalone Table Invocation Using NextPrime to Generate Sequence of Division of Integers

Table[Prime[n]/(2 n), {n, 1, 10}] NestList[NextPrime[Numerator[#]]/(Denominator[#] + 2) &, 3/4, 8] \left\{1,\frac{3}{4},\frac{5}{6},\frac{7}{8},\frac{11}{...
• 21.4k
1 vote
Accepted

### Standalone Table Invocation Using NextPrime to Generate Sequence of Division of Integers

[extended comment] It's difficult to figure out exactly what you're asking. If you want Table specifically to perform operations on previous intermediate results, ...
• 31.7k
1 vote

### Insert several rows and problem with Return

Using ReplacePart and Extract: ...
• 165
1 vote

### Insert several rows and problem with Return

m = Table[i*(j + 2), {i, 3}, {j, 3}]; v1 = Range[10, 12]; v2 = Range[20, 22]; Using Fold: ...
• 29.3k

Only top scored, non community-wiki answers of a minimum length are eligible