  We revisit and generalize some geometric techniques behind deterministic
primality testing for some integer sequences using curves of genus 1 over
finite rings. Subsequently we develop a similar primality test using the
Jacobian of a genus 2 curve.
