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