  We consider some bilinear recurrences that have applications in number
theory. The explicit solution of a general three-term bilinear recurrence
relation of fourth order is given in terms of the Weierstrass sigma function
for an associated elliptic curve. The recurrences can generate integer
sequences, including the Somos 4 sequence and elliptic divisibility sequences.
An interpretation via the theory of integrable systems suggests the relation
between certain higher order recurrences and hyperelliptic curves of higher
genus. Analogous sequences associated with a $q$-discrete Painlev\'e I equation
are briefly considered.
