OFFSET
1,5
COMMENTS
See A290885 for the imaginary part of the n-th term of S.
See A290886 for the square of the norm of the n-th term of S.
This sequence is a variant of A290536.
The representation of the first terms of S in the complex plane has nice fractal features, and looks like a Dragon curve (see also Links section).
The building of this sequence is close to that of the Twindragon (see Wikipedia link).
The sequence S' built with the same rules but with the initial term S'(1) = 1 seems to be the complement of S; the set of elements of S is the image of the set of elements of S' with respect to the symmetry z -> 1 - z.
From Rémy Sigrist, Jul 10 2018: (Start)
For any n >= 0 with binary expansion Sum_{k=0..h} b_k * 2^k, let g(n) = Sum_{k=0..h} b_k * (1+i)^k (where i denotes the imaginary unit).
Apparently, g(n) = i * a(n+1) - A290885(n+1) for any n >= 0.
The function g has similarities with the function f defined in A316657.
(End)
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, PARI program for A290884
Wikipedia, Dragon curve
Wikipedia, Twindragon
EXAMPLE
Let f be the function z -> z * (1+i), and g the function z -> (z-1) * (1+i) + 1.
S(1) = 0 by definition; so a(1) = 0.
f(S(1)) = 0 has already occurred.
g(S(1)) = -i has not yet occurred; so S(2) = -i and a(2) = 0.
f(S(2)) = 1 - i has not yet occurred; so S(3) = 1 - i and a(3) = 1.
g(S(2)) = 1 - 2*i has not yet occurred; so S(4) = 1 - 2*i and a(4) = 1.
f(S(3)) = 2 has not yet occurred; so S(5) = 2 and a(5) = 2.
g(S(3)) = 2 - i has not yet occurred; so S(6) = 2 - i and a(6) = 2.
f(S(4)) = 3 - i has not yet occurred; so S(7) = 3 - i and a(7) = 3.
g(S(4)) = 3 - 2*i has not yet occurred; so S(8) = 3 - 2*i and a(8) = 3.
PROG
(PARI) See Links section.
(PARI) a(n) = imag(subst(Pol(binary(n-1)), 'x, I+1)); \\ Kevin Ryde, Apr 04 2020
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Aug 13 2017
STATUS
approved