login
a(n) is the "real" part of f(n) = Sum_{k>=0, d_k>0} w^(d_k-1) * (-2)^k where Sum_{k>=0} d_k * 4^k is the base-4 representation of n and w = -1/2 + sqrt(-3)/2 is a primitive cube root of unity; sequence A348911 gives "w" parts.
2

%I #19 Nov 09 2021 15:01:37

%S 0,1,0,-1,-2,-1,-2,-3,0,1,0,-1,2,3,2,1,4,5,4,3,2,3,2,1,4,5,4,3,6,7,6,

%T 5,0,1,0,-1,-2,-1,-2,-3,0,1,0,-1,2,3,2,1,-4,-3,-4,-5,-6,-5,-6,-7,-4,

%U -3,-4,-5,-2,-1,-2,-3,-8,-7,-8,-9,-10,-9,-10,-11,-8

%N a(n) is the "real" part of f(n) = Sum_{k>=0, d_k>0} w^(d_k-1) * (-2)^k where Sum_{k>=0} d_k * 4^k is the base-4 representation of n and w = -1/2 + sqrt(-3)/2 is a primitive cube root of unity; sequence A348911 gives "w" parts.

%C For any Eisenstein integer z = u + v*w (where u and v are integers), we call u the "real" part of z and v the "w" part of z.

%C The function f defines a bijection from the nonnegative integers to the Eisenstein integers.

%H Rémy Sigrist, <a href="/A348910/b348910.txt">Table of n, a(n) for n = 0..16383</a>

%H Rémy Sigrist, <a href="/A348910/a348910.png">Colored representation of f(n) for n = 0..4^10-1 in a hexagonal lattice</a> (where the hue is function of n)

%H Rémy Sigrist, <a href="/A348910/a348910.gp.txt">PARI program for A348910</a>

%H Gary Teachout, <a href="http://teachout1.net/village/fill2.html">Fractal Space Filling Curves 2002</a>, section "A Four Tile Star"

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Eisenstein_integer">Eisenstein integer</a>

%F a(2^k) = A077966(k) for any k >= 0.

%o (PARI) See Links section.

%Y See A334492 for a similar sequence.

%Y Cf. A077966, A348911.

%K sign,base

%O 0,5

%A _Rémy Sigrist_, Nov 03 2021