OFFSET
0,3
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..728
Kevin Ryde, Plot2 of X=A163325,Y=A163326, illustrating the ternary Z-order curve.
FORMULA
EXAMPLE
11 in ternary base (A007089) is written as '102' (1*9 + 0*3 + 2), from which we pick the "zeroth" and 2nd digits from the right, giving '12' = 1*3 + 2 = 5, thus a(11) = 5.
PROG
(PARI) a(n) = fromdigits(digits(n, 9)%3, 3); \\ Kevin Ryde, May 14 2020
CROSSREFS
KEYWORD
AUTHOR
Antti Karttunen, Jul 29 2009
EXTENSIONS
Edited by Charles R Greathouse IV, Nov 01 2009
STATUS
approved