login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A164677 For a binary reflected Gray code, the (Hamming/Euclidean) distance between 2 subsequent points x and y is 1, say in coordinate k. If y has a 1 in coordinate k and x has a 0, than (x,y) is indicated by k, if it is the other way around, (x,y) is indicated by -k. The sequence has a fractal character such that G(d+1) = G(d) d+1 R(G(d)) where R(G(d)) alters d --> -d and leaves all other numbers invariant. 4
1, 2, -1, 3, 1, -2, -1, 4, 1, 2, -1, -3, 1, -2, -1, 5, 1, 2, -1, 3, 1, -2, -1, -4, 1, 2, -1, -3, 1, -2, -1, 6, 1, 2, -1, 3, 1, -2, -1, 4, 1, 2, -1, -3, 1, -2, -1, -5, 1, 2, -1, 3, 1, -2, -1, -4, 1, 2, -1, -3, 1, -2, -1, 7, 1, 2, -1, 3, 1, -2, -1, 4, 1, 2, -1, -3, 1, -2, -1, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

This is the paper-folding sequence Fold(1,2,3,4,5,...). It is also the fixed point of the map 1->1,2; 2->-1,3; 3->-1,4; 4->-1,5; ...; -1->1,-2; -2->-1,-3; -3->-1,-4; -4->-1,-5; ... [Allouche and Shallit]. - N. J. A. Sloane, Jul 27 2012

REFERENCES

J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 203, Exercise 15.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..8192

Index entries for sequences obtained by enumerating foldings

FORMULA

a(n) = (-1)^chi_A091067(n)*A001511(n), where chi_A091067 is the characteristic function of A091067. - M. F. Hasler, Aug 06 2015

PROG

(PARI) A164677(n)=(valuation(n, 2)+1)*if(n>>valuation(n, 2)%4==3, -1, 1) \\ M. F. Hasler, Aug 06 2015

CROSSREFS

Absolute values give A001511.

Indices of negative terms are listed in A091067. - M. F. Hasler, Aug 06 2015

Sequence in context: A157226 A156249 A187808 * A001511 A265331 A244569

Adjacent sequences:  A164674 A164675 A164676 * A164678 A164679 A164680

KEYWORD

easy,sign

AUTHOR

Arie Bos, Aug 20 2009

EXTENSIONS

More terms from Alois P. Heinz, Jan 30 2012

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 20 18:31 EST 2018. Contains 299381 sequences. (Running on oeis4.)