Hi Sasha,

As I understand it your question have 2 parts:

1. Is there some relation between continued fractions and projective resolutions?

2. Is there some relation between rationality of a number and finite cohomological dimension of an object in an (abelian) category?

Now let me make those questions more concrete (and of course lose information):

Can one construct a natural example of an abilian category $C$ and a real invariant $f:C \to \mathbb R$, s.t.

1. A projective resolutions of an object $X$ in $C$ will give a continued fraction representation of $f(X)$?

2. $f$ will map finite cohomological dimension objects to rational numbers?

Here I think that the answer for 1 is no and for 2 is yes. Let me explain why:

1. The recursive definition of projective resolution ${P_i}$ of an object $X$ is: $X_0=X$ and an exact sequence $0 \to X_{i+1} \to P_i \to X_i \to 0$ The recursive definition of continued fraction ${a_i}$ of a number $x$ is: $x_0=x$ and $x_n=a_n+1/x_{n+1}$. It is unlikely to find an invariant that maps an exact sequence $0 \to A \to B \to C \to 0$ to numbers satisfying $c=b+1/a$, one reason is that if $B=A+C$ then $0 \to C \to B \to A \to 0$ is also exact but the relation $c=b+1/a$ is not symmetric. You can try to go to derived categories this might be relevant for squark remark but I doubt that it will help here.

2. Consider the Grotendic group $K(C)$ and it subgroup $K_0(C)$ generated by images of protective objects (it coincide with the one generated by images of finite cohomological dimension objects). In case that you category is monoidal, I believe that one can show that $K_0(C)$ is a subring. Now you just need to find an homomorphism $f:K(C) \to \mathbb R$ s.t. $f(K_0(C)) \subset \mathbb Q$. This sounds as a reasonable task. You can ask some experts in K-theory about it, you can also as this question in MO and label it as K-theory question. You can also ask Inna Zakharevich, (http://math.mit.edu/~zakh/) she is doing K-theory and she had worked with invariant that have to do with real and rational numbers. Good luck and keep us updated.