order of group of points of secp256k1
The comment stating n “has to be prime” is a bit confusing.

The order of base point “has” to be prime in the sense that this is a requirement in the particular documents defining standard curves—for example, in SECG, which includes secp256k1. Bitcoin's base point order r is prime.

In SECG, it is also stated that cofactor of secp256k1 curve is 1, which makes n = r × 1, again prime. A group of prime order is obviously cyclic.