Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Sum an expression over integer lattice points inside a quadratic region
ResourceFunction["QuadraticLatticeSum"][expr,{x1,x2,…,xn},Q,L,B] sums expr over integer lattice points inside the quadratic region |
Sum 1 over all integers satisfying x2-4<=0:
| In[1]:= |
| Out[1]= |
Sum 1 over all points in or on the unit disk, x2+y2<=1:
| In[2]:= |
| Out[2]= |
There are 5 points, namely (0,0), (-1,0), (1,0), (0,-1), (0,1):
| In[3]:= |
| Out[3]= | ![]() |
Compute a lattice sum over an ellipsoid:
| In[4]:= |
| Out[4]= |
Plot the ellipsoid:
| In[5]:= |
| Out[5]= | ![]() |
Compute x2+y2 over lattice points defined by an ellipsoid:
| In[6]:= |
| Out[6]= |
Plot the corresponding ellipsoid:
| In[7]:= |
| Out[7]= | ![]() |
Compute the number of lattice points in a sphere with radius 2:
| In[8]:= |
| Out[8]= |
Plot the region:
| In[9]:= |
| Out[9]= | ![]() |
The number of variables must match the dimensionality of the region:
| In[10]:= |
| Out[10]= |
You must give a non-empty list of symbols:
| In[11]:= |
| Out[11]= |
Coefficients must have all numerical values:
| In[12]:= |
| Out[12]= |
Specified matrices must be positive-definite:
| In[13]:= |
| Out[13]= |
This work is licensed under a Creative Commons Attribution 4.0 International License