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.

A217262 Delta sequence for binary words in a minimal-change order (subset-lex Gray code).

This page as a plain text file.
%I A217262 #33 Jan 08 2024 22:42:40
%S A217262 0,1,2,1,0,3,0,1,2,1,0,1,4,1,0,1,2,1,0,3,0,1,2,1,0,1,2,5,2,1,0,1,2,1,
%T A217262 0,3,0,1,2,1,0,1,4,1,0,1,2,1,0,3,0,1,2,1,0,1,2,3,6,3,2,1,0,1,2,1,0,3,
%U A217262 0,1,2,1,0,1,4,1,0,1,2,1,0,3,0,1,2,1,0,1,2,5,2,1,0,1,2,1,0,3,0,1,2,1,0,1,4,1,0,1,2,1,0,3,0,1,2,1,0,1,2,3,4
%N A217262 Delta sequence for binary words in a minimal-change order (subset-lex Gray code).
%C A217262 Positions of change with a certain Gray code (SL-Gray) for binary words (see example): to keep the sequence independent of the word length we start with the all-ones word, the sequence gives the following changes.  The Gray code is cyclic, so first words skipped can (for fixed word length) be appended to the end.
%C A217262 Alternatively, for words length n, start with the all-zeros word, use transitions (n-2), (n-1), (n-2), (n-3), (n-4), ..., 3, 2, 1, 0, followed by the terms of this sequence until all 2^n words have been visited (see rows 00..05 in the example).
%C A217262 The subset-lex Gray code shown here can be obtained by a reflection process from the (reversed) subset-lexicographic order for binary words given in A108918.
%C A217262 Research problem: Does a two-close Gray code exist for the binary words of length n for all n? One-close Gray codes for binary words exists for n<=6 but not for n=7 (and unlikely for any n>=8, see Fxtbook link).
%C A217262 From _Joerg Arndt_, Apr 29 2014: (Start)
%C A217262 Sequence can be obtained from A007814 by replacing 0 by 01210, 1 by 3, 2 by 141, 3 by 12521, 4 by 1236321, ..., n by 123..(n-1)(n+2)(n-1)..321. - _Joerg Arndt_, Apr 29 2014
%C A217262 The consecutive transitions are either one-close (abs(a(n)-a(n-1))=1, most of the time) or 3-close (abs(a(n)-a(n-1))=3): In the Gray code of the 2^n n-bit words all transitions are one-close but for 2^(n-2) - 2 transitions that are 3-close; The Gray codes for n<=3 have only one-close transitions.
%C A217262 (End)
%C A217262 The positions of 0's are twice the terms of A327492. - _Andrey Zabolotskiy_, Jan 06 2024
%H A217262 Joerg Arndt, <a href="/A217262/b217262.txt">Table of n, a(n) for n = 0..4095</a>
%H A217262 Joerg Arndt, <a href="http://www.jjj.de/fxt/#fxtbook">Matters Computational (The Fxtbook)</a>, section 20.3.2 "Adjacent changes (AC) Gray codes", p.400.
%H A217262 Joerg Arndt, <a href="http://www.jjj.de/fxt/demo/seq/#A217262">C++ code to compute this sequence</a>.
%H A217262 Joerg Arndt, <a href="http://arxiv.org/abs/1405.6503">Subset-lex: did we miss an order?</a>, arXiv:1405.6503 [math.CO], (26-May-2014)
%e A217262 Example for word length 5:
%e A217262 no:    word     transition
%e A217262 00:    .....    .1...  3
%e A217262 01:    1....    1....  4
%e A217262 02:    11...    .1...  3
%e A217262 03:    111..    ..1..  2
%e A217262 04:    1111.    ...1.  1
%e A217262 05:    11111    ....1  0 <--= sequence starts
%e A217262 06:    111.1    ...1.  1
%e A217262 07:    11..1    ..1..  2
%e A217262 08:    11.11    ...1.  1
%e A217262 09:    11.1.    ....1  0
%e A217262 10:    1..1.    .1...  3
%e A217262 11:    1..11    ....1  0
%e A217262 12:    1...1    ...1.  1
%e A217262 13:    1.1.1    ..1..  2
%e A217262 14:    1.111    ...1.  1
%e A217262 15:    1.11.    ....1  0
%e A217262 16:    1.1..    ...1.  1
%e A217262 17:    ..1..    1....  4
%e A217262 18:    ..11.    ...1.  1
%e A217262 19:    ..111    ....1  0
%e A217262 20:    ..1.1    ...1.  1
%e A217262 21:    ....1    ..1..  2
%e A217262 22:    ...11    ...1.  1
%e A217262 23:    ...1.    ....1  0
%e A217262 24:    .1.1.    .1...  3
%e A217262 25:    .1.11    ....1  0
%e A217262 26:    .1..1    ...1.  1
%e A217262 27:    .11.1    ..1..  2
%e A217262 28:    .1111    ...1.  1
%e A217262 29:    .111.    ....1  0
%e A217262 30:    .11..    ...1.  1
%e A217262 31:    .1...    ..1..  2
%e A217262 Append first few words to obtain Gray code for word length 5:
%e A217262 00:    .....    .1...
%e A217262 01:    1....    1....
%e A217262 02:    11...    .1...
%e A217262 03:    111..    ..1..
%e A217262 04:    1111.    ...1.
%Y A217262 Cf. A007814 (transitions for the binary reflected Gray code).
%Y A217262 Cf. A108918.
%K A217262 nonn
%O A217262 0,3
%A A217262 _Joerg Arndt_, Sep 29 2012
%E A217262 Prepended a(0)=0, _Joerg Arndt_, Apr 29 2014