An N-curve, in the construction of Whale (2026), is a plane curve obtained from an integer sequence by joining circular arcs of equal arc length tangentially. Each term determines the signed change in tangential angle along the corresponding circular arc. The construction gives a geometric representation of the sequence and its residues. It is related to turtle geometry, in which successive instructions specify line segment lengths and turns (Abelson and diSessa 1981, Colestock 2017).
For a sequence ,
,
..., a positive integer modulus
, and an integer offset
, define
|
(1)
|
where is the least nonnegative residue and
is measured in radians. Thus
is the turn in degrees.
The choice
,
gives signed turns from
through 179 degrees.
Identify the plane with the complex plane, set
and
, and normalize the arc
length of each piece to 1. The displacement of a piece whose initial tangential
angle is zero is
|
(2)
|
with given by the continuous limit.
The sequence of endpoints and directions satisfies
|
(3)
| |||
|
(4)
|
For , the corresponding piece is
|
(5)
|
Its unit tangent vector is ,
so the join has a continuous tangent vector. A
zero turn gives a line segment.
The examples show N-curves for the triangular numbers, square numbers, Fibonacci
numbers, and prime gaps (OEIS A000217,
OEIS A000290, OEIS A000045,
and OEIS A001223). The first three sequences
begin at index 0. The prime gaps begin with ,
where
is the
th prime number. The orange
dots mark the initial points. The modulus,
offset, and number
of pieces are shown for each example. The prime gaps
panel shows a finite initial segment without asserting
closure.
The closure question for a periodic sequence of turns reduces to a rigid motion. Suppose and write
.
Then
|
(6)
|
where . When
,
this rigid motion is a rotation
about
. If
is a root of unity of order
, then
. Consequently,
after
blocks both the point
and its tangent vector return to their initial
values. The completed trace has rotational symmetry
of order at least
. Additional symmetries
of the trace can make the full order larger. A return of the point
alone can also occur before the tangent vector
returns.
For integer turns in degrees, let be their sum over a block. If
, then
|
(7)
|
where denotes the greatest
common divisor. In the illustrated examples, the triangular
numbers have a residue period
of 720 and
, the square
numbers have a residue period
of 180 and
, and the Fibonacci
numbers modulo 36 have a residue period
of 24 and
. Their traces therefore close after 2160,
2160, and 240 pieces, respectively.
When , the block gives a translation.
The curve closes with matching tangent vector after
a block iff
, and otherwise repeats along
an unbounded chain. For example, the two signed turns
,
give
|
(8)
|
so returning to the initial direction does not imply closure. The three panels illustrate a block with turns 120 and 0 degrees, a block with turns 180 and degrees, and a block with two turns of 180 degrees. These
produce a rotation of order 3, a nonzero translation,
and the identity transformation, respectively.