Informally speaking, an "almost integer" is a real number very close to an integer.
There are some known ways to construct such examples in a systematic way. One is through the use of certain algebraic numbers called Pisot numbers. These numbers $\alpha$ have the property that their powers can get arbitrarly close to integers, that is:
$\lim_{n \to \infty} \alpha - [\alpha^n] = 0$
where $[ .]$ is the nearest integer function.
A well-known example is given by the golden ratio $\varphi = \frac{1 + \sqrt{5}}{2}$, whose powers are increasingly close to integers:
$\varphi^{19} = 9349.000107...$
$\varphi^{25} = 167761.00000596...$
Another example comes from numbers of the form $e^{\pi\sqrt{n}}$.
A well-known example is Ramanujan's constant:
$e^{\pi\sqrt{163}} = 262537412640768743.99999999999925007...$
There's another interesting way to generate almost integers by using the numbers $e$ and $\pi$. By using the identity
$$\sum_{n=-\infty}^\infty e^{-\pi n^2x}=x^{-1/2}\sum_{n=-\infty}^\infty e^{-\pi n^2/x}.$$
we can derive the approximate identity
$$ (*) \sum_{k=0}^{n-1}{e^{-\frac{k^2\pi}{n}}}\approx\frac{1+\sqrt{n}}{2}$$
which provides a way to construct almost integers with increasing precision:
$ e^{-\frac{\pi}{9}} + e^{-4\frac{\pi}{9}} + e^{-9\frac{\pi}{9}} + e^{-16\frac{\pi}{9}} + e^{-25\frac{\pi}{9}} + e^{-36\frac{\pi}{9}} + e^{-49\frac{\pi}{9}} + e^{-64\frac{\pi}{9}} = 1.0000000000010504... $
$\sum_{k=1}^{24} e^{-k^2\frac{\pi}{25}} = 2.000000000000000000000000000000000310793...$
$\sum_{k=1}^{48} e^{-k^2\frac{\pi}{49}} = 3.000000000000000000000000000000000000000000000000000000000000000000838654...$
So, the question is: is there another way to generate almost integers -with or without increasing precision- by using transcendental functions, as in the previous example?
(Note that there's a trivial way to do this: By taking a convergent series $\sum_{k = 1 }^\infty x_k$ and its limit $L$, the number $1/L\sum_{k = 1 }^n x_k$ will be an almost integer, namely close to $1$, but I'm looking for a an example like identity (*), or for a different, non trivial one). So, I am looking for an example that may be of the form $\sum_{k = 1 }^n f(x_k)$, where $f(x)$ is a transcendental function of $x$, that is able to generate a set of different almost integers (zero excluded).