Sam Walters posted something interesting on Twitter yesterday I hadn’t seem before:

The sines of the positive integers have just the right balance of pluses and minuses to keep their sum in a fixed interval. (Not hard to show.) #math pic.twitter.com/RxeoWg6bhn

— Sam Walters (@SamuelGWalters) November 29, 2018

If for some reason your browser doesn’t render the embedded tweet, he points out that

for all positive integers *N*.

Here’s a little Python script to illustrate the sum in his tweet.

from scipy import sin, arange import matplotlib.pyplot as plt x = arange(1,100) y = sin(x).cumsum() plt.plot(x, y) plt.plot((1, 100), (-1/7, -1/7), "g--") plt.plot((1, 100), (2, 2), "g--") plt.savefig("sinsum.svg")

## Exponential sums

Exponential sums are interesting because crude application of the triangle inequality won’t get you anywhere. All it will let you conclude is that the sum is between –*N* and *N*.

(Why is this an exponential sum? Because it’s the imaginary part of the sum over *e*^{in}.)

For more on exponential sums, you might like the book Uniform Distribution of Sequences.

Also, I have a page that displays the plot of a different exponential sum each day, the coefficients in the sum

being taking from the day’s date. Because consecutive numbers have very different number theoretic properties, the images vary quite a bit from day to day.

Here’s a sneak peak at what the exponential sum for Christmas will be this year.