OFFSET
0,8
COMMENTS
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.
This sequence has connections with A316657; here we work with Eisenstein integers, there with Gaussian integers.
It appears that f defines a bijection from the nonnegative integers to the Eisenstein integers.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..16806
Rémy Sigrist, Colored representation of f(n) for n = 0..7^7-1 in a hexagonal lattice (where the hue is function of n)
Rémy Sigrist, PARI program for A334492
Wikipedia, Eisenstein integer
EXAMPLE
The following diagram depicts f(n) for n = 0..13:
"w" axis
\
. . . . . . . .
\ 10 9
\
. . . . . . . .
3 \ 2 11 7 8
\
._____._____._____._____._____._____._____. "real" axis
4 0 \ 1 12 13
\
. . . . . . . .
5 6 \
- f(9) = 4 + 2*w, hence a(9) = 4.
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, May 03 2020
STATUS
approved