OFFSET
0,7
COMMENTS
The function f defines a bijection from the nonnegative integers to the Gaussian integers.
The following diagram depicts g(d) for d = 0..12:
|
| +
| 3
|
+ + + +
6 5 |4 2
|
--------+----+----+-------
7 |0 1
|
+ + + +
8 |10 11 12
|
+ |
9 |
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..2197
Stephen K. Lucas, Base 2 + i with digit set {0, +/-1, +/-i}, ResearchGate (October 2021).
Rémy Sigrist, Colored representation of f for n = 0..13^5-1 in the complex plane (the hue is function of n)
FORMULA
a(13^k) = A121622(k).
PROG
(PARI) g(d) = { if (d==0, 0, (1+I*((d-1)%3))*I^((d-1)\3)) }
a(n) = real(subst(Pol([g(d)|d<-digits(n, 13)]), 'x, 3+2*I))
CROSSREFS
KEYWORD
sign,base
AUTHOR
Rémy Sigrist, Oct 27 2021
STATUS
approved