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.
%I A164677 #33 Jun 09 2025 09:03:08 %S A164677 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, %T A164677 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, %U A164677 -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 %N 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. %C A164677 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 %C A164677 Multiplicative because both A034947 and A001511 are. - _Andrew Howroyd_, Aug 06 2018 %D A164677 Jean-Paul Allouche and Jeffrey Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 203, Exercise 15. %H A164677 Alois P. Heinz, <a href="/A164677/b164677.txt">Table of n, a(n) for n = 1..8192</a> %H A164677 Madeleine Goertz and Aaron Williams, <a href="https://arxiv.org/abs/2411.19291">The Quaternary Gray Code and How It Can Be Used to Solve Ziggurat and Other Ziggu Puzzles</a>, arXiv:2411.19291 [math.CO], 2024. See pp. 2, 26. %H A164677 <a href="/index/Fo#fold">Index entries for sequences obtained by enumerating foldings</a>. %F A164677 a(n) = (-1)^chi_A091067(n)*A001511(n), where chi_A091067 is the characteristic function of A091067. - _M. F. Hasler_, Aug 06 2015 %F A164677 a(n) = A034947(n)*A001511(n). - _Andrew Howroyd_, Aug 06 2018 %F A164677 Multiplicative with a(2^e) = e+1, and a(p^e) = (-1)^(e*(p-1)/2) for an odd prime p. - _Amiram Eldar_, Jun 09 2025 %t A164677 a[n_] := KroneckerSymbol[-1, n] * IntegerExponent[2n, 2]; %t A164677 Array[a, 80] (* _Jean-François Alcover_, Sep 08 2019 *) %o A164677 (PARI) A164677(n)=(valuation(n,2)+1)*if(n>>valuation(n,2)%4==3,-1,1) \\ _M. F. Hasler_, Aug 06 2015 %Y A164677 Absolute values give A001511. %Y A164677 Indices of negative terms are listed in A091067. - _M. F. Hasler_, Aug 06 2015 %Y A164677 Cf. A034947. %K A164677 easy,sign,mult %O A164677 1,2 %A A164677 _Arie Bos_, Aug 20 2009 %E A164677 More terms from _Alois P. Heinz_, Jan 30 2012