Probably this is well known.

$\theta_2$ and $\theta_3$ are Jacobi theta functions
as defined in [mathworld](http://mathworld.wolfram.com/JacobiThetaFunctions.html) (31) and (32).

For natural $n$ define
$$ f(n) = \frac{\theta_2(-e^{-\pi\sqrt{n}})}{\theta_3(-e^{-\pi\sqrt{n}}))}$$

According to mathworld (46), $f(3)$ is algebraic.

Experimentally $f(n)$ is algebraic at least for

$$ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 15 , 16 , 18 , 19 , 22 , 23 , 25 , 27 , 28 , 31 , 37 , 39 , 43 , 55 , 58 , 63 , 67 , 163$$

This holds to precision $10^4$ and the list might be incomplete.

The sequence doesn't appear in OEIS though includes
all [Heegner numbers](http://en.wikipedia.org/wiki/Heegner_number).

>Q1 When is $f(n)$ algebraic?
>
>Q2 Why Heegner numbers are in the list?
>
>Q3 Is there closed form for some other $f(n)$?.
>
>Q4 Is $f(n)$ algebraic for other $n$?