[seqfan] Re: Turtle transform

Eric Angelini Eric.Angelini at kntv.be
Mon Dec 9 14:16:30 CET 2013


Hello SeqFans,
here are a few diagrams -- and ideas.
Many thanks to Jean-Marc Falcoz and Maximilian Hasler,
Best,
É.
http://www.cetteadressecomportecinquantesignes.com/Champer.htm



-----Message d'origine-----
De : SeqFan [mailto:seqfan-bounces at list.seqfan.eu] De la part de M. F. Hasler
Envoyé : lundi 9 décembre 2013 5:40
À : Sequence Fanatics Discussion list
Objet : [seqfan] Turtle transform

Dear SeqFans,

inspired by a private communication from Eric Angelini,
I suggest a new(?) [integer] sequence transformations
(plus some variants), which I tentatively call "Turtle transformation"(s)
(in memoriam of the turtle graphics in the Logo programming language)

The complex Turtle transformation of a sequence
a : n -> a(n) , n >= offset ;
is the sequence obtained from a(n) by

1) defining a sequence of "directions"
d(n) = d(n-1) * i * (-1)^a(n) ; d(offset-1)=1

2) then the turtle transform is the sequence of partial sums of "steps
of length" a(n) "in direction" d(n), i.e., d(n)*a(n),

T(a) = n -> sum_{k=offset...n} d(k)*a(k) ; T(a)(offset-1) = 0.

The interpretation is that T(a) represents a "walk" in the complex plane,
where at the n-th step, the "cursor" turns to the left or to the right
depending on the parity of a(n), and then walks a distance of a(n)
units.

This in turn gives rise to at least 3 (integer) sequences (if a(n) is
an integer sequence), namely

Re T(a) ; Im T(a) ; and
S(a) = these two interleaved, i.e.
S(a)(2n-1)=Re T(a)(n) ; S(a)(2n)=Im T(a)(n).

There are several variants possible :

a) use abs( a(n) ) instead of a(n) in case of a signed sequence
(this will destroy bijectivity)

b) don't use only left or right turns depending on parity, but rather
a turn of 90° * a(n).

c) use a second sequence, b(n), for the "turns", to define the
b-Turtle transform of a(), say  T[b](a)  or  T(a ; b) = sum( d[b](k) *
a(k),  k=offset..n )
 with d[b](n) = product( i^b(k) ; k=offset...n )   [or prod( i * (-1)^b(k)...) ]

d) use some other initial condition for the direction (a priori just
amounts to a multiplication by a unimodular number of the transformed
sequence)
or, e.g., the opposite convention for turning left or right (which
should correspond to a change of sign and/or complex conjugation).

It is easy to see that both, the b-Turtle and (a-)Turtle
transformation, are bijective.

For sequences with only odd numbers, such as the primes, the variant
(b) above is more "interesting". I will denote it by T', and look at
its action on prime=A40:
It turns out that T'(prime)(56) = -13+8*i, i.e., almost exactly back
to the origin, after having made an "excursion" as far as 702 - 1197*i
around n=46 ;
then again the cursor goes away to T'(prime)(78) = -2922 - 1733*i,
before "crossing" the origin during the 99-th step,
going from -256 + 37*i to 267 + 37*i.

Just for the fun, I submitted that sequence as oeis.org/draft/A233399
, including the picture after step 99 (drawn in red),
https://oeis.org/A233399/a233399_1.png

Maximilian

_______________________________________________

Seqfan Mailing list - http://list.seqfan.eu/



More information about the SeqFan mailing list