This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A128173 Numbers in ternary Gray code order. 3
 0, 1, 2, 5, 4, 3, 6, 7, 8, 17, 16, 15, 12, 13, 14, 11, 10, 9, 18, 19, 20, 23, 22, 21, 24, 25, 26, 53, 52, 51, 48, 49, 50, 47, 46, 45, 36, 37, 38, 41, 40, 39, 42, 43, 44, 35, 34, 33, 30, 31, 32, 29, 28, 27, 54, 55, 56, 59, 58, 57, 60, 61, 62, 71, 70, 69, 66, 67, 68, 65, 64, 63, 72 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 LINKS Alois P. Heinz, Table of n, a(n) for n = 0..19682 MAPLE A128173 := proc(nmax) local K, tmp, n3, n, r, c, t, a ; n3 := 3 ; n := 1 ; K := linalg[matrix](n3, 1, [[0], [1], [2]]) ; while n3 < nmax do n3 := n3*3 ; n := n+1 ; tmp := K ; K := linalg[extend](K, 2*n3/3, 1, 0) ; K := linalg[copyinto](tmp, K, 1+n3/3, 1) ; K := linalg[copyinto](tmp, K, 1+2*n3/3, 1) ; for r from 1 to n3 do K[r, n] := floor((r-1)/(n3/3)) ; od ; for r from n3/3+1 to n3/2 do for c from 1 to n do t := K[r, c] ; K[r, c] := K[n3+1-r, c] ; K[n3+1-r, c] := t ; od ; od ; od ; a := [] ; for r from 1 to n3 do a := [op(a), add( K[r, c]*3^(c-1), c=1..n) ] ; od ; a ; end: A128173(30) ; # R. J. Mathar, Jun 17 2007 CROSSREFS Cf. A003188, A105529, A105530. Sequence in context: A222235 A163332 A275105 * A265362 A264989 A060125 Adjacent sequences:  A128170 A128171 A128172 * A128174 A128175 A128176 KEYWORD nonn AUTHOR Ralf Stephan, May 09 2007 EXTENSIONS More terms from R. J. Mathar, Jun 17 2007 Offset changed to 0 by Alois P. Heinz, Feb 23 2018 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 18 06:56 EDT 2019. Contains 324203 sequences. (Running on oeis4.)