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

%I #17 Jul 25 2021 03:36:43

%S 0,1,1,0,-1,-1,0,3,4,4,3,2,2,3,2,3,3,2,1,1,2,-1,0,0,-1,-2,-2,-1,-3,-2,

%T -2,-3,-4,-4,-3,-2,-1,-1,-2,-3,-3,-2,1,2,2,1,0,0,1,8,9,9,8,7,7,8,11,

%U 12,12,11,10,10,11,10,11,11,10,9,9,10,7,8,8,7,6,6

%N a(n) is the "real" part of f(n) = Sum_{k>=0, d_k>0} (1+w)^(d_k-1) * (3+w)^k where Sum_{k>=0} d_k * 7^k is the base 7 representation of n and w = -1/2 + sqrt(-3)/2 is a primitive cube root of unity; sequence A334493 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 This sequence has connections with A316657; here we work with Eisenstein integers, there with Gaussian integers.

%C It appears that f defines a bijection from the nonnegative integers to the Eisenstein integers.

%H Rémy Sigrist, <a href="/A334492/b334492.txt">Table of n, a(n) for n = 0..16806</a>

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

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

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

%e The following diagram depicts f(n) for n = 0..13:

%e "w" axis

%e \

%e . . . . . . . .

%e \ 10 9

%e \

%e . . . . . . . .

%e 3 \ 2 11 7 8

%e \

%e ._____._____._____._____._____._____._____. "real" axis

%e 4 0 \ 1 12 13

%e \

%e . . . . . . . .

%e 5 6 \

%e - f(9) = 4 + 2*w, hence a(9) = 4.

%o (PARI) See Links section.

%Y Cf. A307013 (equivalent coordinate for a counterclockwise spiral), A316657, A334493.

%K sign,base,look

%O 0,8

%A _Rémy Sigrist_, May 03 2020