The behavior seems to be as modular arithmetic but in a growing structure. For n >= 13 the structure is essentially a column of tangent circles of radius 1.
Table of n, a(n) for n=1..16.
Primes in A211002.
Cf. A211000, A211001, A211010, A211011, A211020-211023.
Sequence in context: A198187 A198019 A198018 * A068331 A177104 A078330
Adjacent sequences: A211000 A211001 A211002 * A211004 A211005 A211006
Omar E. Pol, Mar 30 2012