I just came across a way that the amazing mathematician Ramanujan developed of assigning a value to certain divergent series. I found it interesting, so I want to share a short summary of it here. It is based on the Euler–Maclaurin formula

\begin{align*} \sum_{k=\alpha}^\beta f(k) &= \int_\alpha^\beta f(t)\,dt + \frac{f(\alpha)+f(\beta)}{2} \\ &\quad+ \sum_{k=1}^n \frac{B_{2k}}{(2k)!}\Bigl(f^{(2k-1)}(\beta)-f^{(2k-1)}(\alpha)\Bigr) + R_n \end{align*}where $B_{2k}$ denotes the $(2k)$th Bernoulli number, $f$ has $2n+1$ continuous derivatives on $[\alpha,\beta]$ with $\alpha$, $\beta$, and $n\geq0$ being integers, and $R_n$ is the remainder term given by

\[ R_n = \int_\alpha^\beta \frac{B_{2n+1}(t-\lfloor t\rfloor)}{(2n+1)!}f^{(2n+1)}(t)\,dt . \] Continue reading

# The importance of direction

Lately I’ve been reflecting on the impact that having a direction (or lack of it) has had in my life. For a long time now—since around the time I first set foot on a university campus—it’s been clear to me that I would be doing and writing about mathematics for the rest of my life. However, perhaps because I have never been particularly interested in thinking about money I never necessarily assumed that I would *be paid* to do mathematics. My expectation was that I might need to have a day job to support myself and my mathematical hobby.

Recently, I’ve been thinking that being paid to do mathematics would be great because it would allow me to devote more time to it. For example, I am quite proud of my latest paper—but it took a lot of time to write, and would have taken even longer if I didn’t already have a job as a postdoctoral researcher. One of my previous papers was written during evenings and weekends since at the time I was working full-time at an internship and it wasn’t ideal.

Thus, I’ve been doing the things necessary to apply to academic positions like putting together a research statement. During this process the importance of direction has been made abundantly clear to me and I can’t help but lament the amount of time I spent as an undergraduate and graduate student with unclear direction and ridiculous misconceptions.

For example, as an undergraduate student I studied the Ramanujan–Nagell equation and came up with a new solution for it that I hadn’t seen published anywhere. My thought was: this is so cool, I have to share this with the world. So I wrote a short report, gave a copy to one of my professors who I thought might be interested, and uploaded a copy to my website. But what to do beyond that? My thinking was: I don’t know how to get it published somewhere, but I do know how to make it accessible to anyone who wants to read it via the Internet. I told myself that 99% of the value comes from writing the report and I didn’t need the additional 1% “seal of approval” that comes from getting it published. Now I know this is totally backwards—at least when it comes to job applications almost all of a paper’s value is derived from being published.

Looking back, my advice to myself would **absolutely** be to try to get the report published. Maybe I could’ve gotten it published and maybe not, but either way it would have been a very valuable learning experience. Incidentally, the report *does* seem to be of value to some people: it’s been cited by two OEIS entries, two published papers, a PhD thesis, and Noam Elkies recently gave a talk referencing it (!!!):

We state several finiteness theorems, outline some of the connections among them, explain how a finiteness proof can be ineffective, and (time permitting) sketch Nagell’s proof and an even more elementary one discovered only 12 years ago by C. Bright.

Maybe I’ll come back to that result and get it formally published some day, but I *already* have more than enough papers on the table. At the very least it’s encouraging to know that I’m in no danger of running out of material to research and write about anytime soon. Even more importantly, I’ve learned how important direction is to achieving your dreams.

# Five years of dancing

Five years ago I decided to start a new project which was totally different than anything I’d done before in my life: I decided to become a salsa dancer. The impetus for this was a drive to improve my overall well-being by deliberately pushing my boundaries—up until 2013, I spent the majority of my life on academic pursuits and the extent to which I focused on this had created a severe imbalance. In short, I didn’t have many friends, I was generally uncomfortable socializing with people, and even more to the point: Girls didn’t like me, at least not in “that” way.

I signed up for and took my first salsa class on May 28, 2013. I was absolutely terrified and struggled with the class but nevertheless committed to giving it my best effort for at least five years. It felt like a last-ditch effort: I wanted to improve at forming relationships but I had no idea what I could do to change. I didn’t know if salsa dancing would help, but I reasoned that the terror and incompetence that I felt while salsa dancing was temporary and would disappear once I had years of dancing under my belt. In short, I expected that dancing would eventually become second-nature if I kept at it—and then if nothing else I would be in a better position to improve my social relationships.

I kept that commitment I made 5 years ago, and since then the longest I’ve gone without salsa dancing has been the 1–2 weeks during the Christmas break. The result? Not only has my hypothesis that salsa dancing would eventually feel natural been confirmed, the effects on the rest of my life have been nothing short of transformative. I have a healthy social circle of friends, I’m much less shy to the point I enjoy socializing, and I’m much more comfortable using my physical body for things, even starting other hobbies like weight lifting. And yes, I started getting attention from girls.

For me, salsa dancing was a vehicle for changing one of the things most resistant to change but probably the thing I most needed to change: my identity. Previously my identity was the nerd who excelled at school but struggled at social relationships and as long as I thought of myself in those terms my ability to form social relationships was severely crippled. I had prioritized academics to the exclusion of everything else, and I was proud of it.

What I came to learn was that while taking actions that are at odds with one’s identity feels incredibly awkward and painful, it *is* possible to rewire your identity with consistent effort applied over an extended period of time. This was far from easy, as my identity resisted the change at every step of the way, and I would often slip back into my older more comfortable identity that I had built up over two decades. It would happen reflexively: One Thursday when I had been dancing for over a year I remembered that I would be going out that night to dance. A sudden wave of fear swept over me as I realized that I was going to have to ask girls to dance that night—immediately followed by a wave of relief when I remembered that I did that every week.

Because I started from an identity of almost the polar opposite of a salsa dancer, my case essentially provides a lower-bound on the amount that it is possible to change. I’ve taught and assisted many people taking salsa classes and there are only a few I’ve seen that I would consider less skilled than myself when I started. Nowadays people don’t believe me when I tell them how much I struggled for years in ways which at the time felt scarring. As an example of how exceptionally incompetent I was when I started, my very first salsa social dance of my life was interrupted by a random bystander who asked if I was okay or needed help. 😂

In fact, I’m still struggling, because there is no end point you reach when you know it all. This is perhaps the biggest lesson I’ve learned from 5 years of dancing: the struggle itself is inherently meaningful, and I’ve learned to embrace the struggle as a purposeful and worthwhile part of learning and growing.

# The value of the trigonometric harmonic series revisited

Shortly after my last post I realized there was a simpler way of determining the exact value of the series $\sum_{n=1}^\infty\cos n/n$. Instead of following the method I previously described which required the intricate analysis of some integrals, one can simply use the formula

\[ \sum_{n=1}^\infty\frac{a^n}{n} = -\ln(1-a) \]

which is valid for $a\in\mathbb{C}$ which satisfies $\lvert a\rvert\leq 1$ and $a\neq 1$. This comes from a simple rewriting of the so-called Mercator series (replace $x$ with $-x$ in the Taylor series of $\ln(1+x)$ and then take the negative).

Then we have

\begin{align*}

\sum_{n=1}^\infty\frac{\cos n}{n} &= \sum_{n=1}^\infty\frac{e^{in}+e^{-in}}{2n} \\

&= -\bigl(\ln(1-e^i)+\ln(1-e^{-i})\bigr)/2 \\

&= -\ln\bigl((1-e^i)(1-e^{-i})\bigr)/2 \\

&= -\ln(2-e^i-e^{-i})/2 \\

&= -\ln(2-2\cos1)/2 \\

&\approx 0.0420195

\end{align*}

since $\lvert e^i\rvert=\lvert e^{-i}\rvert=1$, but $e^i\neq1$ and $e^{-i}\neq1$.

# The value of the trigonometric harmonic series

I’ve previously discussed various aspects of the “trigonometric harmonic series” $\sum_{n=1}^\infty\cos n/n$, and in particular showed that the series is conditionally convergent. However, we haven’t found the actual value it converges to; our argument only shows that the value must be smaller than about $2.54$ in absolute value. In this post, I’ll give a closed-form expression for the exact value that the series converges to.

# The names in boxes puzzle

This is one of the best puzzles I’ve come across:

100 prisoners have their names placed in 100 boxes so that each box contains exactly one name. Each prisoner is permitted to look inside 50 boxes of their choice, but is not allowed any communication with the other prisoners. What strategy maximizes the probability that every prisoner finds their own name?

I heard about this puzzle years ago, spent several days thinking about it, and never quite solved it. Actually, I did think of a strategy in which they would succeed with probability over 30% (!), which was the unbelievably-high success rate quoted in the puzzle as I heard it posed. However, I ended up discarding the strategy, as I didn’t think it could possibly work (and probably wouldn’t have been able to prove it would work in any case).

# A difference of squared sines

The purpose of this post is to show the interesting identity

\[ \sin(x)^2-\sin(y)^2 = \sin(x+y)\sin(x-y) . \]

# A sum of sines

In this post I want to prove a lemma which gives a closed-form expression for the summation $\sum_{n=1}^m\sin(nx)$. The method of proof has come up before; it uses basic algebra, the complex exponential expression for sine, and the summation of a geometric series formula.

# Revisiting a lemma

We’ve discussed before the “trigonometric harmonic” series $\sum_{n=1}^\infty\cos n/n$. In particular, we showed that the series converges (conditionally). The argument involved the partial sums of the sequence $\{\cos n\}_{n=1}^\infty$, and we denoted these by $C(m)$. The closed-form expression we found for $C(m)$ involved the quantity $\cos m-\cos(m+1)$; in this post we show that this expression can also be written in the alternative form $2\sin(1/2)\sin(m+1/2)$.

# That harmonic series variant absolutely

Previously I discussed a variant on the harmonic series, $\sum_{n=1}^\infty\cos n/n$. Last time we showed that

\[ \sum_{n=1}^\infty\frac{\cos n}{n} = \sum_{n=1}^\infty\sum_{m=1}^n\cos m\Bigl(\frac{1}{n}-\frac{1}{n+1}\Bigr) , \]

and then showed that the series on the right converges absolutely, by comparison with the series $\sum_{n=1}^\infty3/n^2$.

Since the series on the right converges and the two series have the same value, the series on the left also converges. However, this does not imply that the series on the left also converges absolutely. As a trivial counterexample, if a conditionally convergent series sums to $c$ then $c\sum_{n=1}^\infty \href{http://en.wikipedia.org/wiki/Kronecker_delta}{\delta_{n,1}}$ is an absolutely convergent series which sums to the same value. 🙂

In this post, we answer the question of whether $\sum_{n=1}^\infty\cos n/n$ converges absolutely or not.