Maybe it's a very simple question, but I have a problem with the following series
$$\sum\limits_{n=1}^{\infty}\frac{1}{n^2+pn+q},$$
where $p, q \in \mathbb{R}$. I know about five ways how to calculate the series
$$\sum\limits_{n=1}^{\infty}\frac{1}{n^2+r^2}, \,\, r&gt;0.$$
The most "beautiful" way for me is a Poisson summation formula:
$$\sum\limits_{n=-\infty}^{+\infty} f(n) = \sum\limits_{n=-\infty}^{+\infty}\int\limits_{-\infty}^{+\infty} f(x)e^{2\pi nix}dx$$
Hence, for $f(x)=(x^2+r^2)^{-1}$
$$\int\limits_{-\infty}^{+\infty} \frac{e^{2\pi nix}dx}{x^2+r^2} = \frac{\pi}{r}e^{-2\pi|n|r}$$
(this integral can be taken by residue).
Therefore,
$$\sum\limits_{n=-\infty}^{+\infty} f(n)= \sum\limits_{n=-\infty}^{+\infty}\frac{1}{n^2+r^2}= \frac{1}{r^2}+2\sum\limits_{n=1}^{+\infty}\frac{1}{n^2+r^2} = \sum\limits_{n=-\infty}^{+\infty}\frac{\pi}{r}e^{-2\pi|n|r}=\frac{\pi}{r}+\frac{2\pi}{r}\frac{e^{-2\pi r}}{1-e^{-2\pi r}}.$$
Finally,
$$\sum\limits_{n=1}^{+\infty}\frac{1}{n^2+r^2}=\frac{1}{2r}(\pi+\frac{2\pi e^{-2\pi r}}{1-e^{-2\pi r}}-\frac{1}{r}).$$
Also I know how to calculate the series
$$\sum\limits_{n=1}^{\infty}\frac{1}{(n+r)^2}, \,\, r&gt;-1.$$
I prefer a Calabi's method.
$$\frac{1}{(n+r)^2}=\int\limits_0^1\int\limits_0^1 (xy)^{n+r-1}dxdy.$$
Then
$$\sum\limits_{n=1}^{\infty}\frac{1}{(n+r)^2}=\sum\limits_{n=1}^{\infty}\int\limits_0^1\int\limits_0^1 (xy)^{n+r-1}dxdy=\int\limits_0^1\int\limits_0^1(\sum\limits_{n=1}^{\infty} (xy)^{n+r-1})dxdy=\int\limits_0^1\int\limits_0^1 \frac{(xy)^r dxdy}{1-xy}.$$
After rotation of the coordinate system by $\pi/4$ and separation of the initial integral into two components, we can obtain a very complex recursive formula.

But what about the series of the form
$$\sum\limits_{n=1}^{\infty}\frac{1}{n^2+pn+q},$$
are there any appropriate methods at least for some $p, q \in \mathbb{R}$?


Question: Sharing JavaScript model code between server and client, is this approach valid?
Answer: I think it's a better solution to use require.js (especially for using frameworks like underscore in multiple files). You should use a factory only for objects that change during the runtime. A shopping cart for example (but even in this example i think it's more appropriate to use a backbone collection that is given to your function as an argument when instantiated).
See more information here: http://requirejs.org/docs/node.html