cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A163326 Pick digits at the odd distance from the least significant end of the ternary expansion of n, then convert back to decimal.

This page as a plain text file.
%I A163326 #20 Sep 27 2020 02:38:05
%S A163326 0,0,0,1,1,1,2,2,2,0,0,0,1,1,1,2,2,2,0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,
%T A163326 5,5,3,3,3,4,4,4,5,5,5,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,8,8,8,6,6,6,7,7,
%U A163326 7,8,8,8,6,6,6,7,7,7,8,8,8,0,0,0,1,1,1,2,2,2,0,0,0,1,1,1,2,2,2,0,0,0
%N A163326 Pick digits at the odd distance from the least significant end of the ternary expansion of n, then convert back to decimal.
%H A163326 Antti Karttunen, <a href="/A163326/b163326.txt">Table of n, a(n) for n = 0..728</a>
%H A163326 Kevin Ryde, <a href="http://oeis.org/plot2a?name1=A163325&amp;name2=A163326&amp;tform1=untransformed&amp;tform2=untransformed&amp;shift=0&amp;radiop1=xy&amp;drawpoints=true&amp;drawlines=true">Plot2 of X=A163325,Y=A163326</a>, illustrating the ternary Z-order curve.
%H A163326 <a href="/index/Con#coordinates_2D_curves">Index entries for sequences related to coordinates of 2D curves</a>
%F A163326 a(n) = A163325(floor(n/3))
%F A163326 a(n) = Sum_{k>=0} A030341(n,k)*b(k) with (b) = (0,1,0,3,0,9,0,27,0,81,0,243,0,...): powers of 3 alternating with zeros. - _Philippe Deléham_, Oct 22 2011
%e A163326 42 in ternary base (A007089) is written as '1120' (1*27 + 1*9 + 2*3 + 0), from which we pick the first and 3rd digits from the right (zero-based!), giving '12' = 1*3 + 2 = 5, thus a(42) = 5.
%o A163326 (PARI) a(n) = fromdigits(digits(n,9)\3,3); \\ _Kevin Ryde_, May 15 2020
%Y A163326 A059906 is an analogous sequence for binary. Note that A037314(A163325(n)) + 3*A037314(A163326(n)) = n for all n. Cf. A007089, A163327-A163329.
%K A163326 nonn,base
%O A163326 0,7
%A A163326 _Antti Karttunen_, Jul 29 2009
%E A163326 Edited by _Charles R Greathouse IV_, Nov 01 2009