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]:= | ![ResourceFunction["SequenceToProduct"][{1, 2, 3, 4}, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/0eec6599f2fa9b36.png)  | 
| Out[1]= |   | 
Convert an elided sequence to a product:
| In[2]:= | ![ResourceFunction["SequenceToProduct"][{1, 2, 3, \[Ellipsis], 10}, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/636b4a84eb887be5.png)  | 
| Out[2]= |   | 
Evaluate with Activate:
| In[3]:= |   | 
| Out[3]= |   | 
Convert an infinite sequence to a product:
| In[4]:= | ![ResourceFunction["SequenceToProduct"][{1, 1/2, 1/3, \[Ellipsis]}, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/1462db12f44735d6.png)  | 
| Out[4]= |   | 
Convert an geometric sequence to a product:
| In[5]:= | ![ResourceFunction["SequenceToProduct"][{1, 1/2, 1/4, \[Ellipsis]}, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/4c8c68e35ecd5022.png)  | 
| Out[5]= |   | 
Convert another geometric sequence to a product and evaluate:
| In[6]:= | ![ResourceFunction[
 "SequenceToProduct"][{1/3, 1/6, 1/12, \[Ellipsis]}, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/1e02dead1d74fea5.png)  | 
| Out[6]= |   | 
| In[7]:= |   | 
| Out[7]= |   | 
Convert an arithmetic sequence to a product:
| In[8]:= | ![ResourceFunction["SequenceToProduct"][{5, 12, 19, 26, \[Ellipsis]}, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/294fe75010abe1e3.png)  | 
| Out[8]= |   | 
Convert another arithmetic sequence to a product and evaluate:
| In[9]:= | ![ResourceFunction["SequenceToProduct"][{5, 10, 15, \[Ellipsis], 50}, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/0e9961bacc0eff86.png)  | 
| Out[9]= |   | 
| In[10]:= |   | 
| Out[10]= |   | 
Convert an alternating sequence to a product and evaluate:
| In[11]:= | ![ResourceFunction[
 "SequenceToProduct"][{1/2, -(1/4), 1/8, -(1/16), 1/32, \[Ellipsis], -(1/1024)}, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/395631c5a38b8aae.png)  | 
| Out[11]= |   | 
| In[12]:= |   | 
| Out[12]= |   | 
Convert a rational sequence to a product:
| In[13]:= | ![ResourceFunction[
 "SequenceToProduct"][{2, 5/2, 10/3, 17/4, 26/5, 37/6, 50/7, \[Ellipsis]}, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/3742c732ac223798.png)  | 
| Out[13]= |   | 
Convert a hypergeometric sequence to a product:
| In[14]:= | ![ResourceFunction["SequenceToProduct"][{1, 2, 6, 24, 120, 720, 5040},
  n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/17c15ccd69373da9.png)  | 
| Out[14]= |   | 
| In[15]:= | ![ResourceFunction[
 "SequenceToProduct"][{1, 6, 54, 648, 9720, 174960, \[Ellipsis]}, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/123760eab9845bef.png)  | 
| Out[15]= |   | 
The ellipsis symbol (…) can appear anywhere within the input sequence:
| In[16]:= | ![ResourceFunction[
 "SequenceToProduct"][{\[Ellipsis], 1/2, 1/6, 1/18}, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/11620b006ae95866.png)  | 
| Out[16]= |   | 
| In[17]:= | ![ResourceFunction[
 "SequenceToProduct"][{\[Ellipsis], 1/3, 1/6, 1/9, \[Ellipsis]}, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/2f8345249811bdf4.png)  | 
| Out[17]= |   | 
If successful, SequenceToProduct returns an expression with head Inactive[Product]:
| In[18]:= | ![res = ResourceFunction[
  "SequenceToProduct"][{1, 1/2, 1/4, \[Ellipsis]}, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/26a3dbaf52368340.png)  | 
| Out[18]= |   | 
| In[19]:= | ![Head[res]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/4fbad58c7f35f612.png)  | 
| Out[19]= |   | 
If unable to infer the elided part of a sequence, SequenceToProduct will return unevaluated:
| In[20]:= | ![ResourceFunction[
 "SequenceToProduct"][2, 3, 5, 7, 11, 13, 17, \[Ellipsis], 29]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/5ba7f42dd9aebcd5.png)  | 
| Out[20]= |   | 
SequenceToProduct uses FindSequenceFunction to recognize patterns in the input sequence:
| In[21]:= | ![seq1 = {1, 1, 2, 3, 5, 8, 13};
FindSequenceFunction[seq1, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/68d90048bd593495.png)  | 
| Out[22]= |   | 
| In[23]:= | ![ResourceFunction["SequenceToProduct"][seq1, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/1b60aac0882e9f82.png)  | 
| Out[23]= |   | 
| In[24]:= | ![seq2 = {2, 3, 5, 7, 11};
FindSequenceFunction[seq2, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/1201573fbe655fa0.png)  | 
| Out[25]= |   | 
| In[26]:= | ![ResourceFunction["SequenceToProduct"][seq2, n]](https://www.wolframcloud.com/obj/resourcesystem/images/336/336f9f6e-e233-495c-ae96-e5c1fa364c48/55aab0bc9244ade3.png)  | 
| Out[26]= |   | 
This work is licensed under a Creative Commons Attribution 4.0 International License