Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Turn a sequence of expressions into a symbolic product
ResourceFunction["SequenceToProduct"][{e1,e2,…},n] attempts to return an inactive product representing e1×e2×… where the user-supplied variable n is used in forming the generic term. |
Convert a simple finite sequence to a product:
In[1]:= |
|
Out[1]= |
|
Convert an elided sequence to a product:
In[2]:= |
|
Out[2]= |
|
Evaluate with Activate:
In[3]:= |
|
Out[3]= |
|
Convert an infinite sequence to a product:
In[4]:= |
|
Out[4]= |
|
Convert an geometric sequence to a product:
In[5]:= |
|
Out[5]= |
|
Convert another geometric sequence to a product and evaluate:
In[6]:= |
|
Out[6]= |
|
In[7]:= |
|
Out[7]= |
|
Convert an arithmetic sequence to a product:
In[8]:= |
|
Out[8]= |
|
Convert another arithmetic sequence to a product and evaluate:
In[9]:= |
|
Out[9]= |
|
In[10]:= |
|
Out[10]= |
|
Convert an alternating sequence to a product and evaluate:
In[11]:= |
|
Out[11]= |
|
In[12]:= |
|
Out[12]= |
|
Convert a rational sequence to a product:
In[13]:= |
|
Out[13]= |
|
Convert a hypergeometric sequence to a product:
In[14]:= |
|
Out[14]= |
|
In[15]:= |
|
Out[15]= |
|
The ellipsis symbol (…) can appear anywhere within the input sequence:
In[16]:= |
|
Out[16]= |
|
In[17]:= |
|
Out[17]= |
|
If successful, SequenceToProduct returns an expression with head Inactive[Product]:
In[18]:= |
|
Out[18]= |
|
In[19]:= |
|
Out[19]= |
|
If unable to infer the elided part of a sequence, SequenceToProduct will return unevaluated:
In[20]:= |
|
Out[20]= |
|
SequenceToProduct uses FindSequenceFunction to recognize patterns in the input sequence:
In[21]:= |
|
Out[22]= |
|
In[23]:= |
|
Out[23]= |
|
In[24]:= |
|
Out[25]= |
|
In[26]:= |
|
Out[26]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License